4 ms·
Turbo Pascal was great, but it says something nasty that the useful Pascal implementations are all non-standard and, most of them, proprietary.
by msla 4y ago
Turbo Pascal was great, but it says something nasty that the useful Pascal implementations are all non-standard and, most of them, proprietary.
- nequo 4y agoWhat 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.
- badsectoracula 4y agoI don't think it says anything nasty, AFAICT that was Wirth's approach to languages in general: they were all meant to be modified and extended for each platform and need. Even his own implementations had extensions to accommodate what it needed to do (e.g. IIRC his Oberon-07 implementation for ARM had some additional data types). Besides in practice in the last ~3 decades or so every implementation was based on Borland's dialect (which AFAIK was based on the UCSD dialect). Also FWIW Free Pascal is both open source and has a mode to compile code in standard Pascal, though it was added relatively recently (version 3.0.0 released in 2015 - i wrote "relatively" because the compiler exists since the mid-90s).
- pjmlp 4y agoIndirectly based on UCSD, Object Pascal was born at Apple, and that one is influenced by UCSD and clascal, with feedback from Niklaus Wirth.
- pjmlp 4y agoIn practice that is what also happens in C, because everyone codes against GCC C, clang C, MSVC C, TI C, ARM C,... with lots of #ifdef spaghetti. As for the proprietary part, fpc exists.