Live data from Hacker News

Why use Pascal?

castle-engine.io

171–180 of 516 posts

Re: Why use Pascal?

#172

Often overlooked, the Ada embedded ecosystem has advantages of maturity in static analysis, debugging, and target support.

It isn't the friendliest to get started on macos.

Alire mostly resolves that. It can manage the compilers you have installed. Much better than the situation a few years back.

https://alire.ada.dev/

Re: Why use Pascal?

#173
post #163

Earlier quoted context omitted.

I saw a talk that touched on this recently: https://www.youtube.com/watch?v=Tml94je2edk He explains that dynamically-typed languages like Python, Ruby, and JS became popular in the 90s because they offered a fast feedback loop for website building, and they didn't need an IDE or compilers, which were slow (and often not free). It ended up not being worth trading your development time for the performance increase when…

Do not forget Pearl.

Yes, it is a gem of a language.

Now, I wonder who its mother is?

Re: Why use Pascal?

#175
post #129

Earlier quoted context omitted.

Edit: In his Pascal report Wirth mentions math zero times: http://pascal.hansotten.com/uploads/books/Pascal_User_Manual... And in fact in 1971 he wrote that it was basically copied from ALGOL: https://oberoncore.ru/_media/library/wirth_the_programming_l... Edit2: Most relevant part from second link: "The syntax has been devised so that Pascal texts can be scanned by the simplest techniques of syntactic analysis". Tha…

Yeah. weinzierl has his/her syntax preference, and that's fine. As the ancients said, "There's no disputing about tastes." But the attempt to provide a rationalization for why the taste is correct is complete nonsense.

It's not about taste, really. We all learn mathematical notation in primary school. It is an universal language. Programming languages support many concepts that are either the same in math or very similar.

Using the symbols for the same concepts in both worlds is the obvious and sensible choice.

The reason why C did choose a different convention was that it preferred similarity with FORTRAN which is so old that it was punched on cards that did simply not have a : character.

Now it is 2023 and I argue that we should use the same symbols in programming that children are taught in primary school instead of ones that were chosen merely because more than 70 years ago the proper characters were not yet available.

Re: Why use Pascal?

#176
post #105
post #87

Earlier quoted context omitted.

That's completely missing the point. While Pascal can be used for serious work, it is first and foremost a teaching language friendly to beginners meant for introducing people (who back in the day) likely started with something like BASIC to concepts of structured and objects oriented programming. The syntax is easy to learn, fairly clean and the language has very fast compilation (C++ really can't compete here). Whi…

I seem to recall Golang being inspired by it too, but I could be misremembering.

I believe you're right. iirc, that's where the := notation comes from

Re: Why use Pascal?

#177
I wouldn't use it.

...but I'm kinda glad Delphi was my first language. I feel it primed my thinking along helpful lines - typed & pretty rigidly structured.

Spent a lot of time in python since which always felt a little..fuzzy for lack of better word. Recent took up Rust and had a bit of a "oh this feels familiar" moment. Clean and unforgiving.

Re: Why use Pascal?

#178

Why? Old languages must remain around for legacy support. However, it's hard to see the point of shoe-horning all those modern features into an old language. I write a lot of Java, and really, almost everything since Java 8 should not have been added. Lambdas, for example, are a kludge in Java. Want modern features? Use a modern language. If you want to stay in the Java ecosystem, for example, you could use Kotlin. I…

Only in the last few years we have a competing JVM language. Scala was a dead end. Clojure was a fad. Rhino/JS was very limited in its ambition. Java improvements allowed JVM to stay relevant and fend off DotNet, which is a good thing considering Microsoft's history.

> Scala was a dead end.

I'm sure all the companies, like Microsoft, Twitter, Disney, and basically every bank out there, will be very surprised to hear this.

Re: Why use Pascal?

#179

Earlier quoted context omitted.

> Begin End vs { } doesn't really bother me. but they don't really mean the same thing - {} defines a local scope, begin...end doesn't.

They are both used to define blocks. Eg Begin … End in for loops https://wiki.freepascal.org/For From what I recall, Pascal doesn’t support variables scoped within a specific block. But then neither do some languages with C-style curly braces too. So {} and Begin…End are pretty much the same thing. BASIC (and Visual Basic especially) often get a lot of criticism for their syntax but the End Thing style block terminat…

i do not think you understand the concept of scope.
Post reply on HN