10 ms·
GNU Pascal (2005)
- DeathArrow 4y agoSeems abandoned. But Lazarus is doing well, although I doubt there are many Pascal users. There was a time when Pascal was almost as popular as C. In school we learned Pascal after learning Basic and before learning C. I think in US the East coast preferred Pascal and the West coast preferred C.
- actionfromafar 4y agoI preferred C and Pascal looked like a toy language, in retrospect I feel a little guilty. Pascal is a bit like the Go of the time.
- galangalalgol 4y agoI feel the same. I had learned c and x86 asm before they taught pascal, and I was annoyed that I was abstracted from absolute control of the hardware even a little. There was no internet, and all the bbs were long distance, so I had focused on diving into the low level details of a computer andnit didn't expose them as well. Like you, in retrospect I like a lot of aspects of the language.
- DeathArrow 4y agoThese are exactly my thoughts. Maybe Pascal should have been given a bit more attention. While I preferred C (it seemed more "pro" and advanced) and then C++, many of my school mates preferred Pascal and then Delphi.
- ZoomZoomZoom 4y agoI'm interested what are the roots of this common "toy language" perception? Is it the association with learning to program and for this reason with kids? Or is it just the syntax that makes more sense to uninitiated, and thus less like some secret knowledge passed only to the worthy?
- Tozen 4y agoA good argument can be made that it comes from the machinations of Bell Labs (AT&T) and their promotion of C (and later C++). Debatably, a concerted effort was made to attack and belittle Pascal in the media, to get it out of the way. Many people seem to refer to Pascal with a very odd hostility or unknowingly regurgitate talking points originating from Bell Labs, and as if the language froze in time and stayed the same as it was in the 1970s.
- rob74 4y agoWell, a language that's friendly to newbies will also be used by newbies (also leading to some projects or code that are maybe not that good), so more advanced developers (or those who consider themselves more advanced) will have a tendency to turn their nose up. Something similar is currently going on with Rust vs. Go I suspect...
- actionfromafar 4y agoTo me it was a lot that it was so wordy and had weird syntax. Semicolon as a separator instead of "end of this line or statement" felt just insane to someone who just had understood (not really, even) how an assembler worked. I think if it had more C like syntax and was sold as "C, but hardly any footguns", I would have liked it much better. I don't even know what was Pascal and what was Borland stuff, but I remember that I was reluctantly very impressed with its "module" system or whatever it had instead of .obj and .h files.
- DeathArrow 4y agoJust that Go has 10x developers and projects that Rust has. And most Go projects are commercially supported while Rust projects are mostly done for free projects in the line of "let's rewrite X in Rust". If you follow the money, there's where the developers are. And where the developers are, there is the success of a programming language. If it ever was a Rust vs Go contest, Go already won and by a big margin. I can't explain it very good, but I feel like a lot of weird people enjoy Rust and Scala for all the wrong reasons. It's like they enjoy the pain and want that pain to be inflicted to others so they push for those languages.
- bluetomcat 4y agoPascal was the more restrictive and more verbose language, whereas C had more expressivity and terseness. Most of what could be written in C, could be written in Pascal, minus the hacky stuff.
- mickeyp 4y agoRestrictive how? You had full pointer control in pascal and could drop to assembly with the `asm' statement.
- wiz21c 4y agodropping assembly was the killer feature for me. It allowed to migrate gradually from a very easy to understand language to more performance code, without having to understand what a linker does.
- bluetomcat 4y agoPascal pointers are different animals. Since it is a strongly-typed language, juggling between ints and pointers or between pointers of different types is not allowed. Pointer arithmetic on a byte basis is also not straightforward.
- mickeyp 4y agoThat's... not true? You have `Pointer' for generic pointers and you can use `^' to indicate any type should be pointer based. You can then use Inc() or plain addressing plus arithmetic. And you can use `^' again on the right-hand side to dereference it. And you can certainly juggle between different types. You can cast things in Pascal.
- jhbadger 4y agoPascal was a lot like BASIC in that every version added their own (often incompatible) stuff because the official standard language was so limited. Certainly you couldn't drop down to assembly in standard Pascal -- that sounds like something Turbo Pascal added and may be present in modern versions because of the popularity of that.
- ihatepython 4y agoPascal was popular in San Diego, and the early days of Apple iirc
- jhbadger 4y agoYes, the UCSD p-system virtual machine -- basically the same idea as the JVM and .NET but decades earlier -- compile to a virtual machine and deploy to anywhere you had the VM deployed. It was the basis of the Apple Pascal system which was basically an operating system onto itself (on the Apple II, it was used most famously for the early dungeon crawler Wizardry) https://en.wikipedia.org/wiki/UCSD_Pascal https://en.wikipedia.org/wiki/UCSD_Pascal
- acegopher 4y agoAnd was what the Apple Lisa OS was programmed in. https://computerhistory.org/press-releases/chm-makes-apple-lisa-source-code-available-to-the-public-as-a-part-of-its-art-of-code-series/ https://computerhistory.org/press-releases/chm-makes-apple-l...
- TomMasz 4y agoMy learning history is similar to yours Basic->Pascal->C. I feel it was a lot easier learning C by already knowing Pascal than it would have been coming directly from Basic.
- glonq 4y agoA million years ago I learned pascal in highschool then modula-2 in college. But once I learned C/C++, there was no going back...
- blindseer 4y agoHaving had to work in a large pascal codebase, I don't ever want to use this language again. No metaprogramming in the language meant we had some parts of the code that were written in pascal to generate pascal code before compilation of the main project. The code was so verbose, and to get the same thing done in alternative languages would have easily been twice as shorter. Refactoring always took twice as long as I thought it would. Just moving semicolons around was enough to break my concentration when I was in the flow. I think the kicker was identifiers being case insensitive. That alone would have been enough to drive me crazy. People complain about Nim's case insensitive features a lot, but Nim's implementation is actually good and orders of magnitude better than Pascal's. Also hiring a good pascal programmer was next to impossible for us at the time. I don't know why anyone would pick Pascal today over Nim, Zig, Rust, Julia, Go etc.
- freilanzer 4y agoGo also lacks metaprogramming, right?
- tgv 4y agoYes, but there is decent support for code generation. E.g., you can easily get the syntax tree of a go program.
- speed_spread 4y agoMaybe the tools aren't there but there's no reason you couldn't parse Pascal the same way. It's not a complicated language.
- badsectoracula 4y agoFWIW Free Pascal's FCL has the fcl-passrc package that provides units for scanning FPC code, building syntax trees, resolving identifier references and writing/formatting source code. Free Pascal comes with pas2js which "transpiles" Free Pascal code to Java Script and is written using fcl-passrc so it should have enough functionality to parse most FPC code.
- anthk 4y agoWell, Lazarus and Free Pascal are much better. From GNU I wish projects like GNUStep + Applications were much easily built instead of having to do a chain of compilings. Also, Gnome was promoted from GNU back in the day and now it's corporateware too tied to profit/XML/complex settings so they gain lots of money on support but hindering the libre projects depending on GTK+.
- slickcall 4y ago[flagged]
- unpopularopp 4y agoIf Pascal then Ultibo worth a mention. Basically bare metal Free Pascal for Raspberry Pi https://ultibo.org/ https://ultibo.org/
- Rochus 4y agoLooks interesting, thanks for the hint; does it also support the Raspi Pico? Seems like there is an accumulation of Pascal offers for embedded in Australia; here is another one: https://www.astrobe.com https://www.astrobe.com
- unpopularopp 4y agoNope >Note that the Raspberry Pi Pico is not supported by Ultibo core as it is based on a microcontroller instead of a microprocessor and is not able to support the features required by Ultibo core. https://github.com/ultibohub/Core https://github.com/ultibohub/Core https://ultibo.org/wiki/Supported_Hardware https://ultibo.org/wiki/Supported_Hardware
- Rochus 4y agoOk, I see; looks amazing anyway. How many SLOC and person years does it include? Notable uses?
- segfaltnh 4y agoThe most interesting "times have changed" for me reading this was the copyright for the color gradient.
- bmacho 4y agoIt's GNU, and they haven't changed.
- rurban 4y agoI've looked into this abandoned gcc port a while ago, and try to resurrect it, esp. after they added modula2. Didn't get far. It produces of course far better code than free pascal/lazarus. It could even beat all other gcc backends. As you see in some gcc benchmarks, the modula2 part produces the smallest and fastest code of all backends, esp. C++ and C. Which would be nice for safer system languages, since we have only ADA/Spark. And ADA is lost in commercial/military hell, even with Spark. But we would really need a Concurrent Pascal or Oberon dialect, similar to Go. Nowadays I would just add dialects on top of modula2, like the different C standards.
- Qem 4y ago> As you see in some gcc benchmarks, the modula2 part produces the smallest and fastest code of all backends, esp. C++ and C. Modula-2 beats C and Fortran on Fourmilab's FBENCH. See https://www.fourmilab.ch/fbench/fbench.html https://www.fourmilab.ch/fbench/fbench.html