3 ms·
Or use Modula-2, which was recently added to gcc (https://www.phoronix.com/news/Module-2-GCC-Merged https://www.phoronix.com/news/Module-2-GCC-Merged).
by kristianp 4y ago
Or use Modula-2, which was recently added to gcc (https://www.phoronix.com/news/Module-2-GCC-Merged https://www.phoronix.com/news/Module-2-GCC-Merged).
- rurban 4y agoWhen we can use Oberon, there is no need for Modula-2. Oberon is by far simpler and superior. Just enum and records might be missing from the default Oberon.
- mannschott 4y agoEnumerations and subranges (in style of Modula-2 and Pascal) are missing from Oberon, but Records are present subject to type extension in the style of structs in Go. In Oberon(-1), we used (pointers to) procedures in record fields as methods when programming in an object-oriented style. Oberon-2 added methods which dispatch dynamically based on type of receiver. These were "type bound procedures". You'll find this idea echoed in Go as well.