Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure what you're getting at with this recurring assembler argument. The Oberon system and also AOS/Bluebottle are full of inline assembler and SYSTEM tricks with pointer arithmetic, etc.; the Lisa OS is also full of assembler. Even Wirth himself wrote parts of the Ceres system in assembler.


Indeed they are, however when it is C, it is an advantage, gladly ignored that ISO C on its own requires an external Assembly tool to do its job, when it is something else, it is thrown around as proof they aren't as good as C for systems programming, the irony of two weighs, two measures.

"You need Assembly to do XYZ that C can do", yeah right.


> when it is something else, it is thrown around as proof they aren't as good as C for systems programming

That's not my position, and not my argument in this thread. My argument was, that Wirth created his own world and never cared about industry requirements, so industry cared for themselves.

But let me address your concerns. C is an ugly language with a silly syntax (e.g. for arrays, or function types), and the preprocessor is a nightmare, and the weak type checking overlooks a lot of errors (but at least we get warnings, and weak types are very useful when I use C as an IR). But the standard version (ANSI) lets me do all things I need for system development; I don't use inline assembler.

So let's look at Modula-2 (since you seem to see it as Wirth's response to industry needs). First, we have to differ between Wirth's Modula-2, and ISO Modula-2, which is a completely different language (more industry friendly, containing things Wirth was strictly against, and he even refused to participate). So let's stick with Wirth's Modula-2. The first thing that annoys me is the requirement of the original 1982 specification to capitalize all keywords. The second thing is the removal of any type checking for all operations essential for low-level system programming (a pattern Wirth continued in Oberon). ADDRESS is declared as POINTER TO WORD, and the specification doesn't define whether pointer arithmetics has byte or WORD resolution. Type casting is very limited (i.e. restricted to SYSTEM.TRANSFER or variant records without tag, but not in expressions). There is no conditional compilation and only limited compile-time evaluation. There is no explicit "extern" declaration; the use of definition without implementation modules is inofficial and compiler dependent. Some of these issues were "fixed" in ISO Modula. But if I compare Modula-2 e.g. with Ada, which is indeed a true system language explicitly designed for critical industry needs, even ISO Modula is still very limited.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: