3 ms·
My Modula-2 book doesn't mention most of those things. The Modula-2 it describes was about equivalent to C with syntax modernizations and a nod to modules. I su
by ncmncm 5y ago
My Modula-2 book doesn't mention most of those things. The Modula-2 it describes was about equivalent to C with syntax modernizations and a nod to modules. I suspect you may be conflating it with a later effort, maybe Modula-3.
- pjmlp 5y agoTime to update your Modula-2 book past 1978 first ISO standard, here Extended ISO Modula-2: https://modula2.awiedemann.de/manual/comp3.html https://modula2.awiedemann.de/manual/comp3.html Which alongside Modula-2+, served as influence to Modula-3. Stuff C definitely doesn't have, even when compared with 1978 Modula-2 standard: - Proper strings with bounds checking - Proper arrays with bounds checking - Type safe enumerations - Set types - Arrays with enumerated types as indexes, flexibility to set lower and upper bounds - Explicit unsafe code - Reference parameters - Nominal types - Subranges - Explicit casts for several cases where C would do implicit casts or type promotions - Co-routines