Hacker News new | ask | show | jobs
by 59nadir 41 days ago
> If you've sworn off actually getting any value from the programming language

I haven't sworn off getting value from programming languages, I've just concluded that most languages are not useful and good enough to make me deal with the problems they have with tooling, complexity and so on over C.

Your suggestion to use assembly may be you trying to be hyperbolic, but I don't think it's nearly as hyperbolic and ridiculous as it'll sound to a lot of people. I personally think I get plenty of value out of the facilities C provides now, especially with later editions, but it may also be that it'd be holistically better to simply write assembly.

Because that's really what it comes down to: The big picture version of a lot of languages are that while the languages themselves may seem like an upgrade, their interaction with debuggers, etc., are not. A concrete example of this in Odin is that debuggers do not work particularly well with tagged unions (tagged unions have concrete integer values for tags in Odin, and the unions are generated anonymously and are not clear regarding which case is which), so whichever upside you have with language support for tagged unions, you'll still pay for it at debugging time. Meanwhile, in C with real enum types as you have in C23, your tag will be whichever enum value you have, i.e. readable and understandable, and your actual union cases will be exactly what you named them.

For just about every feature I like in Odin I have a similar story of where it falls apart with regards to tooling and other things. A "good language" doesn't mean that actually developing with it is any better than developing with an arguably less featureful and "worse" language.

1 comments

I was absolutely serious about assembler.

I spent a considerable portion of my career writing C. But for the past few years I write only Rust in my free time (I do write little snippets in other languages, including Odin, but nothing serious)

Debugger support is like any other tooling problem, you need somebody who agrees with you about what the tools ought to do - to do the work. In C there have been decades for somebody to put together the rudimentary pieces needed to debug C and that's hardly a tall order

In the specific case you cited (tagged unions) you need a better pretty printer and you need Odin to emit the debugging info so that the debugger can understand these types and the pretty printer can display them to you. Without that you're staring at raw data and no surprise it doesn't feel like C would be less useful.

Sure, but all of this comes down to "Which reality do we live in and do you want to do the work to get the reality you prefer?". I don't think Odin provides enough of an upside for me to "fix" tooling. If I can get a simpler, even less ambitious language, and I can have my tools just work that way as well, this seems like a pretty winning scenario.

So yeah, it's not that you can't have a debugger that understands all of Odin perfectly, it's more like the reality we do have is one where basically none of them understand Odin perfectly, one has built-in (read-only) support for just slightly better Odin-specific views/functionality, two have read-only support (no interaction with built-in types because they use magic intrinsics behind the scenes and magic syntax) for Odin with custom scripts you have to load and everything else is just looking at C.

I've written Odin for 4+ years at this point, so it's not really as if this is a knee-jerk reaction to initial friction. I've spent the time and at this point I am very certain that I don't want to spend any more time with languages where tools are always bad or leaning towards bad, because I've realized that tools are really much more important to me than the languages themselves. I might even start using a language server again because C has one that's ridiculously fast in comparison to what you get with Odin, and it probably won't crash several times a day as soon as you get over some mild threshold like 25k lines, or a "whopping" 5k line file.

Yeah, I am very different, I don't even use a language server. For years I had no syntax highlighting at all - these days I have some basic like comments are blue level highlights turned on. I do a lot of what you'd call printf-debugging and also I write a lot closer to a test-driven style today in Rust than I did in C twenty years ago.

I don't much like Odin (Bill banned me from his Reddit because apparently I'm "just an arsehole") but in 2026 I couldn't live with C's attitude to strings. Odin's choice (using the fat pointer string slice type as the sole type for both owned strings and references into them) sucks but at least it has the fat pointer string slice type.