3 ms·
Yes, but what I mean: he saw that the language was not expressive enough to handle a common and useful case. One should start to think about it, and not say 'oh
by andi999 6y ago
Yes, but what I mean: he saw that the language was not expressive enough to handle a common and useful case. One should start to think about it, and not say 'oh well, since I am the language designer I solve it at compiler level'. I mean what if I want to write a function which formats things like writeln into a string (to allow for different decimal separators, or whatever).
- badsectoracula 6y agoWell, i can't speak for Wirth so i don't know why that didn't happen but my guess is that he either didn't think about it (i mean Pascal was already very expressive for its time) or it would considerably complicate both the language and memory handling for an arguably niche use case (remember that write not only accepts variable number of arguments but also different data types - and that doesn't even take into account the special syntax for padding, number of digits for reals, etc). It is better to think read/write as akin to 'while', 'if', etc than as regular procedures. Making your own 'if' might be neat, but not something you'd see often outside of Lisp :-P
- vidarh 6y agoWirth did "start to think about it": He developed Modula, Modula-2, Oberon, Oberon-2, Oberon-07. It was not addressed in his Pascal versions because he moved on from Pascal, not because he didn't recognise that Pascal was too limited for many use-cases.