4 ms·
What exactly does it say? I have no personal experience with any historical or current Pascal implementation. I would be curious to hear your point of view.
by nequo 4y ago
What exactly does it say? I have no personal experience with any historical or current Pascal implementation. I would be curious to hear your point of view.
- WalterBright 4y agoNiklaus Wirth's Pascal was more of a teaching tool than a useful programming language. It took a lot of extensions to fix that, and each Pascal inventor invented their own extensions. I know this from having read his book and using an early Pascal compiler, and being very frustrated with it. Pascal did, however, have a very nice feature - nested functions. It's the one feature from Pascal that I incorporated into D, and they're such a nice feature I continue to be surprised they aren't adopted by other languages.
- pjmlp 4y agoHence why Modula-2 came out in 1978 to fix those issues.
- amval 4y agoIt is a very nice feature. As far as I know, it is a common pattern in Scala and I also do it in Julia (although there might be some small performance penalty). It just makes complex code much more readable without polluting the module's scope. So I am not sure how common it is, but there are at least some languages that allow this.
- vidarh 4y agoClosures take their place in many languagrs. Gcc supports nested functions in C as an extension, though, and I agree it's nice.
- msla 4y ago> Niklaus Wirth's Pascal was more of a teaching tool than a useful programming language. Which is one reason I don't like self-conscious "teaching" programming languages: They rarely escape the stench of condescension that pervades such endeavors, which means they lack features some designer or team of designers though were "too advanced" for early learners but which are essential to writing any nontrivial code. See also: BASIC, another language where the standard is honored more in the breach than the observance, to the point that "Basic" is more of a "vibe" than any actual set of syntax and features you can point to. (In fact, modern nice Basic dialects have nearly converged with Object Pascal.) > Pascal did, however, have a very nice feature - nested functions. It's the one feature from Pascal that I incorporated into D, and they're such a nice feature I continue to be surprised they aren't adopted by other languages. Not that you don't know this, of course, but GCC has long has nested functions as an extension to the C programming language. Which, again, is an example of a nice quality-of-life feature added to a somewhat lacking language as a nonstandard extension. Oh, well.
- WalterBright 4y ago> GCC has long has nested functions as an extension to the C programming language I know. Yet, it still hasn't gotten into the C Standard. I've also never seen it used in practice, whereas in D we use it everywhere. I constantly find handy new uses for it.