39 ms·
For various purposes I work on a language comparison project that includes C and candidate successors such as Go, Zig. One question is the language to use for a
by Syzygies 7d ago
For various purposes I work on a language comparison project that includes C and candidate successors such as Go, Zig. One question is the language to use for an archival port of a 1980's computer algebra system written in 32-bit K&R C. While Zig is a great debugging compiler, it's not yet stable enough to be the best target language for archival purposes.
https://github.com/Syzygies/Compare https://github.com/Syzygies/Compare
So you're in a restaurant where you don't speak the language, you can't read the menu, but you see three price points for set meals featuring the house specialty. (Say, "Crossing the Bridge" noodles in Yunnan.) Which do you choose? My tour guide, the author Fuchsia Dunlop, later agreed with me this is obvious: The middle choice.
So you're choosing between Go and C23 as candidate successors to K&R C. They both have "royal blood". One got the name. Knowing nothing more, which do you choose?
The answer is equally obvious. The one that got the name also got the warts.
- pjmlp 7d agoDespite my usual rants, naturally C23. Minimal rewrite due to the breaking changes introduced in C23 versus K&R C, while the others are a complete rewrite. Even if the syntax is a bit of a kludge there are now ways to indicate bounds on function arguments.
- d0mine 7d agoMiddle may be wrong (it is a marketing trick to add 3rd outragesly expensive option, to make 2nd option look reasonable). The correct answer is “it depends” (even how long you should spend on choosing may depend on context too). For example, write in whatever language you know best, then translate to a more appropriate language using LLMs once the desired behavior can be checked automatically. It is a tactic that works in some cases.
- kelipso 6d agoIt can be used as a marketing trick, possibly because of the logic in GP post. Marketing people use this to trick people, which is different from it being a marketing trick in and of itself.
- flossly 7d agowho's your audience? who will read/use it?
- dharmatech 7d agoYou mention there that you like Ruby and that you wanted Ruby with types (and that you looked at Crystal). I've been messing around with a language that I summarize as: ALOE = Scheme + Smalltalk + Types https://github.com/dharmatech/2026-09-02-aloe-racket https://github.com/dharmatech/2026-09-02-aloe-racket One of the examples is a very basic computer algebra simplifier: https://github.com/dharmatech/2026-09-02-aloe-racket/blob/main/examples/mpl/core.aloe https://github.com/dharmatech/2026-09-02-aloe-racket/blob/ma... That simplifier is based on a computer algebra library in Scheme: https://github.com/dharmatech/mpl https://github.com/dharmatech/mpl
- ksec 6d ago>https://github.com/Syzygies/Compare https://github.com/Syzygies/Compare You might want to take a look at Odin as well.
- harry8 6d agoIf you’re C suite, ignorant and stupid and don’t know what you’re doing which choice minimises your chance of screwing up? The above is an analogy for that situation. If you’re not stupid it fails because you can find out and then make an informed decision. An informed decision will dominate the suggested strategy in terms of chances of not screwing up. This really should be obvious. (In the analogy, your phone has an automatic translator and you use it). Note that I have made no argument for one language over another.
- harry8 6d agoThe point for those who clearly missed it is an objection to “if you know nothing more” No. Find out more. You could still be wrong but it’s less likely than if you apply hokey heuristics on wilful ignorance hoping it somehow works out sight unseen to knowable problems that can be understood and analysed.
- Shorel 6d agoNo D-lang? It seems quite incomplete without it.