Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by astrange on Friday August 05, 2022 @01:14AM
(#32352011)
> PS. the worst C++ code is still a hell of a lot more safe than the best C code.
What? For safe code you need to be able to audit it for logic errors, which you can't do if you can't understand what it does by reading it.
That's why especially fancy code is banned in projects like Linux.
[dead]
Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by Banana699 on Friday August 05, 2022 @04:17AM
(#32353179)
The only one coping here is that who doesn't understand VMs and language research enough and retreats into childish "it was just a joke lol" remarks when out of their depth.
Incidentally, I write all 3 of C, C++ and x86 assembly, which is why I understand how braindead and unfit for human usage they are.
Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by asguy on Friday August 05, 2022 @09:57AM
(#32356181)
I didn't say I was "just joking", but calling C++ "unsafe" was definitely something I think was funny to say.
> Incidentally, I write all 3 of C, C++ and x86 assembly, which is why I understand how braindead and unfit for human usage they are.
I can't take you seriously when you make statements like this. You have to be trolling.
PS. the worst C++ code is still a hell of a lot more safe than the best C code. This is easy to convince yourself of by noting that C++ mostly supersets C and only deviates to add more safety and static checking, not less. So it's a strict improvment over C, not by a lot, but an improvment nonetheless.
Here are other examples for VMs not written in any of those 2 braindead languages though:
[1] Bun : JS runtime in Zig. https://bun.sh/
[2] Squeak : Smalltalk VM written in Smalltalk. http://www.vpri.org/pdf/tr1997001_backto.pdf
[3] PyPy : Not actually a single VM but an entire framework\toolchain to write VMs, most famous of which is one for Python. The language used to write VMs for the framework is a subset of python called Rpython. https://doc.pypy.org/en/latest/
[4] Maxine Virtual Machine : a JVM written entirely in Java. It's not the only one. https://en.wikipedia.org/wiki/Maxine_Virtual_Machine ; https://news.ycombinator.com/item?id=15733645
Modern VM research is far beyond the 50 year old assembler that thinks itself a programming language. The future is here, just not very evenly distributed.