←back to thread

228 points Retro_Dev | 1 comments | | HN request time: 0s | source
Show context
blippage ◴[] No.44462083[source]
I tried Zig some time ago to use with microcontrollers. It has a generator for the pins, which was nice. But subsequent versions broke as Zig changed syntax. So I started going down the rabbit-hole (it needed a newer version of llvm, for example) until I eventually decided that the game wasn't worth the candle.

The fact that another breaking change has been introduced confirms my suspicion that Zig is not ready for primetime.

My conclusion is to just use C. For low-level programming it's very hard to improve on C. There is not likely to be any killer feature that some other contender will allow you to write the same code in a fifth of the lines nor make the code any more understandable.

Yes, C may have its quirky behaviour that people gnash their teeth over. But ultimately, it's not that bad.

If you want to use a better C, use C++. C++ is perfectly fine for using with microcontrollers, for example. Now get back to work!

replies(10): >>44462098 #>>44462163 #>>44462194 #>>44462322 #>>44462409 #>>44462430 #>>44462780 #>>44463127 #>>44463517 #>>44464834 #
mamcx ◴[] No.44464834[source]
I can relate, because I have so much things in years that broke left and right, but at the same time (except if you are talking about pre/alphas) I think is unhealthy to be vary of breaking changes.

A language, in special, should be able to do it. Extreme compatibility is the way to make the mistake that is C.

A breaking change that fix something is a investing that extend infinity to the feature.

Fear to do it, like in C, is how you accumulate errors, mistakes, millions of dollars wasted, because is also compound debt.

P.D: I think langs should be fast to break pre 1.0, and maybe have room to do it each 5/7 years. Despite the debacle of Python (that is in fact more reflective of python than of breaking), there should be possible to make a relatively painless sunsetting with good caring

replies(1): >>44466078 #
flohofwoe ◴[] No.44466078[source]
The problem I have with python2 vs python3 wasn't breaking backward compatibility, but that their "solution" for UNICODE strings is such a weird mess (treating string- and byte-streams as something completely separate instead of treating strings as UTF-8 encoded views on byte streams) The only string encoding that matters today is UTF-8, all others are relics from the early 90s and the sooner we get rid of those the better - e.g. Python caused a whole lot of pain for a solution that would have been useful 30 years ago, but not today.
replies(1): >>44468405 #
1. kbolino ◴[] No.44468405[source]
There's another problem that's affecting more than just Python too: grapheme clusters. It turns out that even a sequence of scalars (code points excluding surrogates) isn't always a safe abstraction anymore.