Somehow strange that the whole video is about FFI with C (Raylib). I'd prefer seeing something about C3's special features like ML (no, not THAT ML) style modules, contracts, (real, as in "not CPP") macros, error handling, ...
Interoperability with C is one of their main points, so it's logical
they want to focus on that. Even more, the success of today's language
is also being measured how well it behaves with existing codebase. It
will be more true in the future, because the existing source code only
grows.
Well, maybe the last bit isn't true for webdev, where if the code rots
it's simply being deleted. Web applications, if they're taken off
production, they're nowhere to be seen, most people never realizing they
ever existed, but even if they knew those applications existed at some
point in time, they would never be able to even see how they looked
like.
Hmm, let me try and ignore anything up to and including ADA and all "C++ replacements" (so no Rust, Carbon, ...): C3, Zig, Austral, Hare, Vale, V, Odin, Jai.
> Rationale: It is very difficult to make goto work well with defer and implicit unwrapping of optional results. It is not just making the compiler harder to write, but the code is harder to understand as well.
That seems to fit your heuristic. Goto being difficult to implement in the compiler doesn't match expected reality.
`goto` is trivial to implement. `goto` doing the right thing jumping over `defer` and implicitly unwrapping optionals (flow-typing) is less nice as you suddenly need to track much more things in the front end.
And you might say "so what, the compiler can be complicated, just make the language easy to use". However, one design constraint is to not make the language hard to reimplement.
And you might not agree with that constraint, but some people feel that this is indeed important. Important enough to not include `goto` as long as the use cases of `goto` are all covered.
It's not difficult to implement goto as such, it's just a JMP instruction, but (I'm not a compiler developer, but I can imagine) implementing goto without introducing strange bugs or crashes is a bit more difficult.
Compilers really like canonical forms. There's a good chance that if, for, while, goto, break and so forth all turn into an edge between basic blocks (anything that doesn't have a branch or branch target in it). In a rather literal sense it's usually all sugar over goto, unless you're doing something niche like carefully preserving structure because your target language doesn't have branches.
So seeing someone say that their compiler struggles to represent goto throws some doubt on how the thing is implemented. Goto should generally be the easiest possible control flow to translate into your IR.
And a LSP exists, but isn't the most stable: https://github.com/pherrymason/c3-lsp