7 ms·
> So, i generally considered Pascal a dead language. Essentially it's dead. Though, looking at all the people trying to learn programming using dynamic langua
by pshirshov 4y ago
> So, i generally considered Pascal a dead language.
Essentially it's dead. Though, looking at all the people trying to learn programming using dynamic languages with managed memory, I really regret that there is no good low-level language targeting learners as ubiquitous as Pascal was. I still advice those who can't grasp basic concepts and data structures (like reference, identity, passing by value, etc) to spend some time with Pascal and some old school-level Pascal books. For some reason that usually works better than K&R and C. I guess it's just about the language being lot simpler and not enforcing extensive pointer operations.
- wilsynet 4y agoI learned how to first program in the early 1990s with Pascal. It never really clicked with me, despite reading multiple different beginner books, and I gave up, figured programming wasn’t for me. Years later I was encouraged to read “The C Programming Language”, and it was revelation. And so here I am many years later with a long and successful career in tech. C was great in the sense that K&R said hey this is a string, and this is strcpy, and oh by the way, this is how you write strcpy.
- sph 4y agoI taught myself C before doing Pascal at school, so it always felt like a toy educational language to me. Also I never managed to get a free copy of Delphi when it was all the rage, so I later moved to VB6, then C++ on Visual Studio and then C#, all of which were easily found in the enthusiast magazines a newbie like me would buy in the 90s. It seems Borland and later Embarcadero had massive distribution and licensing problems, and they are the cause of their demise.
- zozbot234 4y ago> I really regret that there is no good low-level language targeting learners as ubiquitous as Pascal was Some people are betting that Rust will be that language - and it probably can be a viable first programming language if all you're writing is toy programs with trivial use of dynamic memory, like you probably would when learning Pascal. It certainly has better chances than C++.
- pshirshov 4y agoI can't imagine how Rust may be the perfect low-level language for beginners given its unusual typesystem which comes with significant mental overhead. Really, I have no idea how to explain 7 year old kids how to deal with Rust. It works perfectly with Pascal though.
- zozbot234 4y agoI don't think anyone has seriously tried to teach schoolkids to code in Rust just yet. But the way you'd do it would be to treat it as something close to a pure functional language. .clone() all the things and use Cell<> for the hopefully rare case where you really need shared mutability somewhere. (Even RefCell<> is arguably a step-up in complexity over Cell<>.)
- pshirshov 4y agoEssentially your proposal sounds like you would have to invent some kind of convention-defined language on top of Rust. The beauty of old Pascal was its compact feature set which is really easy to explain.
- mr_00ff00 4y agoI really think rust is great, but after learning what memory management is. Teaching rust first would just be a weird memorization of rules that you might not appreciate.
- zozbot234 4y agoThe borrow checking rules of Rust are anything but "weird". They boil down to not mixing up shared references and exclusive borrows; and, more subtly, preserving the distinction between temporary borrows and complete ownership. (I.e. only the owner can dispose an object; when borrowing, you can only give it back.) That's quite teachable, albeit using these rules in practice is not nearly as easy.
- 4y ago
- anta40 4y agoI think saying "essentialy it's dead" is too harsh. Delphi and FPC/Lazarus are still under active development. Some hardcore Delphi-ers from the 2000s I know are still using it, either for maintaining in-house apps or doing side jobs. If you are looking for jobs, I agree Go/Java/Kotlin/C#/PHP yield more search result, though :)
- syntheweave 4y agoI actually went with Pascal(FPC) for my own self-learning in college, in the 2000's, even though I had some classroom exposure to C. Pascal is just a little bit more polished in its syntax around data handling. The pass-by-reference syntax reduces reliance on pointers, and the Borland pointer syntax is sensible(reference vs dereference is indicated by ^ at left vs right) and helps to position pointers as an occasional tool rather than the essence of your program. Trying to teach C syntax involves a mandatory "OK kid, here is how we actually decipher what the * means here and why your program crashes when you try to dereference it" period. We know that it's bad - because everyone, at every level of skill, messes it up occasionally, and there's an inherent tendency in C to do a heap alloc wherever your algorithm needs it and then immediately manipulate it with pointers, instead of thinking through a way of designing it with bounded buffers. Likewise := is a better assignment operator than C =, because you might accidentally leave out the : and compare, but you'll never accidentally add a : and assign. The downside of Pascal syntax relative to C is mostly in control flow, block structure, declarations being more verbose - it's something you can get used to, but it's that little bit harder to jump in and start hacking out something. With the extensions currently in FPC, I'd still prefer using it over C, though. It's a mature development environment, mostly hamstrung by an ecosystem that has fallen behind in favor of newer things.
- int_19h 4y agoModula-2 was Pascal perfected to the point where it could do everything that C could do better and safer. Unfortunately, by then it was too late.
- Rochus 4y ago> Essentially it's dead. Nonsense. Just have a look at current rankings (Stackoverflow survey, IEEE Spectrum, Tiobe, etc.) where Pascal/Delphi is around the same position as e.g. Swift or ABAP; in your logic all these languages are dead, which is obviously wrong. There are also other languages with a Pascal like syntax (e.g. Lua) which do well.
- pshirshov 4y agoInstead of looking at Tiobe ranking (which is flawed in many aspects, in my opinion), I would rather check how many new Pascal/Swift projects were created on Github last year. > syntax Syntax is the least important part of a language. In my opiaion, Lua has almost nothing in common with Pascal (type system, memory model).
- Rochus 4y agoStackoverflow survey IEEE Spectrum and some more (if you don't like TIOBE) It's usually the syntax people complain about. The semantics is very very similar to most of the C syntax flawored languages. The Lua syntax was designed with Modula-2 in mind (a Pascal descendant). It's like saying Macintosh is dead just because its market share is much smaller than Windows.
- pshirshov 4y agoOk. Under what circumstances you would start a new project in FreePascal/Delphi?
- Rochus 4y agoPersonally I would rather use http://oberon-lang.ch http://oberon-lang.ch than plain Pascal. But also Delphi is still used in a lot of commercial projects/products; here are some references: https://www.embarcadero.com/resources/case-studies https://www.embarcadero.com/resources/case-studies or https://delphi.fandom.com/wiki/Good_Quality_Applications_Built_With_Delphi https://delphi.fandom.com/wiki/Good_Quality_Applications_Bui.... So there apparently are good reasons for starting new projects in Delphi; one I would consider is the ease of drawing user interfaces, which can be efficiently done even in a meeting with customers, and the blazingly fast compiler performance; so if you want quick results and a fast, native binary, then it is likely a good option.