855 karma · joined September 17, 2016
You can't fool yourself and have to handle all cases: https://godbolt.org/z/4GqMdPej3
1) Most of pointers in real apps are non-nullable and it's nice to have enforcement from a compiler.
2) Good compilers verify you actually check nullable (optional) values have a corresponding check. In particular Zig literally forces you to unwrap value, so no unexpected state.
It's a really amazing QoL.
And no, optionality doesn't make type system any harder. Also C lacks alignment enforcement on type level and it's a real footgun which Zig also fixed. Zig has many warts but this part (optionality, alignment and slices) makes a big difference comparing to C without Rust/C++ level of type acrobatics.
> I also once believe that complex type systems are the answer, but over time I realized this is not really true.
It's suboptimal decision, you load your brain with stuff compiler should resolve for you.
Edit: ahah, just noticed your nick. Really appreciate your work on C improvements. Please ignore my yapping :) I literally know nothing comparing to you.
There is a huge gap between developer expectation "it's pointing at something known" and hard reality confirmed by zillions of CVE. That's the reason optionality is prevalent in modern languages and type checkers (python, typescript), nowdays even Java has sane non-nullable types.
Every time I touch enterprise C++ codebase it's a freakshow heavily struggling with memory management.
As reference the material could be good, as study it's very questionable.
- 2 are python resource hog
- 2 from AUR don't compile with modern GCC.
- 1 uses gtk battery icon, but uses dark version on dark taskbar, unreadable.
- 1 shows just black square.
Like I spent more time on assessment than I got a first working my tray. Amazing times.For example I got a working application with minimal prompt like "I need an X11 tray icon app showing battery charge level". BTW result: https://github.com/baverman/battray/
Now I'm trying to implement a full taskbar to replace bmpanel2. Results are very positive. I've got feature parity app in 1h with solid zig code.
Experimental extension to make code-cadding as terse as possible.
Recent versions of gnome session are compiled only with wayland support in archlinux. To change DE or distribution or use custom package is quite a stretch to call it's not forced.
[1]: https://www.ifixit.com/repairability/laptop-repairability-sc...
Installed and toyed with KISS for 30min and yes. It's perfect for me!
For practical cases `git worktree` allows to have multiple checkouts. Document marks this section as "partly disputed" with an external link. IMHO git worktrees has the same ergonomics as in fossil. This section kinda discredits the rest of the article.
King and court and lords are the same amount of greedy bastards. The issue with kings is on another plain, what to do with power transfer to a new king. Democracy try to solve exactly this problem. What to do with individuals bending laws to be new kings is another issue to solve.
2 case: It's an issue with mAh markings. Battery rated in Wh has same simple math.
There are no consumer issues jot solves. More over additional ~10^3 magnitude is consumer hostile.
Code as structure could be more conveniently expressed as language data structures as structure nowdays.
For example I'm lost which abstract class to inherit in Scala to obtain mkString for my custom container.