Live data from Hacker News

Why use Pascal?

castle-engine.io

31–40 of 516 posts

Re: Why use Pascal?

#31
post #29
post #22

Earlier quoted context omitted.

Yes they have "moved on". Which is why Alsol was "a language so far ahead of its time, that it was not only an improvement on its predecessors, but also on nearly all its successors.” — Tony Hoare.

- no struct/record type - call by name instead of call by reference - no bitwise operators - probably a lot more, I'm not too familiar with the language The quote may have been closer to the truth at some point, but certainly not today. And while begin/end syntax may be a matter of taste I don't think it's coincidence it's not very common anymore.

Of course it's not true today [1]. That's a 70s or 80s quote.

But still, "moving on" is not always "improving upon" was the point.

[1] Well, mostly not true (the author has backed down somewhat, but the post is still illuminating as a comparison):

http://cowlark.com/2009-11-15-go/

Re: Why use Pascal?

#32
My first languaje after BASIC was Modula2, which looks a lot like Pascal. I studied OOP, algorithms and data structures with Pascal in college, so it's a languaje for which I have great memeories.

Nice to see it's still around.

Re: Why use Pascal?

#33
post #9

I disagree with some of their reasons. Modern: Object Pascal isn't a modern language. It was modern in 1998, maybe, but it hasn't evolved much since then. Latest big change was the addition of generics, behind almost any other language. Fast: FPC doesn't generate particularly fast code, and the nature of OP objects doesn't help with locality. It's faster than scripting languages, but generally slower than AOT compile…

> It's faster than scripting languages, but generally slower than AOT compiled languages, even those with GC.

Not sure about FPC, but Delphi 7 was on par with C++ ten years ago in competitive programming, that is about 2-3 times faster than Java. By competitive programming I mean very short (1-3 seconds per execution max, so any JIT is at disadvantage), CPU-bound single-threaded heavily algorithmic computation on mostly default compiler/runtime settings with no external libraries or ability to tweak. The common knowledge was: you either use C++/Pascal, or use Java and occasionally rewrite your 200-300 line solution to C++ if you get "time limit exceeded" error, and it passes with flying colors.

Re: Why use Pascal?

#34
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'm talking about Java only because I haven't seen Pascal for literally decades. I last programmed Pascal in the 1980s. Adding that laundry list of features to Pascal is just silly.

Re: Why use Pascal?

#35

first word they use to justify using Pascal is that it's "modern". Gave a glimpse at the code source screenshot. No, that syntax is very much the past.

The syntax is timeless, because it is much closer to math than B/BCPL/C heritage. It has its own issues but overall it is much better thought out than most other languages. Here is a comment I wrote a couple of months ago with more arguments for Pascal's syntax: "Yes, Rust does indeed and a long time before that it was Pascal. I really love Pascal's syntax, it makes a lot of sense when you approach it with a math bac…

It's only "mathematical" if you chose very specific parts of the language from a very specific version of Pascal when looked at at a very specific angle.

E.g. the argument falls apart immedately:

- there's no assignment operator in maths

- there are no procedures in maths, everything is a function

- functions cannot be nested in maths (unless I'm mistaken)

- types is maths, but Pascal uses a very narrowed down and dumbed down version of it

etc. etc.

Pascal is the way Pascal is because Wirth wanted the simplest possible language according to Wirth's own criteria that could be compiled in a single pass on a 1980s computer.

It's the go [1] of its time.

That is it. Both the syntax and Pascal's concept are severely outdated. It's a very good thing that modern languages never adopted Pascal's syntax and went for something that is actually usable. Hell, Erlang is a more mathematical and timeless syntax than Pascal, and it's a trivial langauge at it's core.

[1] Can't find the actual text now, but there was a rationale by Rob Pike that go was amed at junior engineers, and needed to be simple.

Re: Why use Pascal?

#36
post #12
post #9

I disagree with some of their reasons. Modern: Object Pascal isn't a modern language. It was modern in 1998, maybe, but it hasn't evolved much since then. Latest big change was the addition of generics, behind almost any other language. Fast: FPC doesn't generate particularly fast code, and the nature of OP objects doesn't help with locality. It's faster than scripting languages, but generally slower than AOT compile…

> On the other hand, the ecosystem is great. Hard disagree. I worked with Pascal for about 10 years, and the lack of modern libraries was a source of frequent frustration, meaning we often had to develop the solutions ourselves, or abandon an idea entirely.

In regards to Delphi there were plenty of them, sold by companies specialised in component libraries.

Naturally one had to be willing to pay for them.

Re: Why use Pascal?

#37

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…

Then we have to switch PLs much more often. Seems reasonable to me to add/integrate new features that have proven to add a benefit to delay this process.

Re: Why use Pascal?

#38
For the first couple of items on the list, Austral might be a language worth considering:

https://austral-lang.org

It's new so it obviously doesn't have the community of libraries to use, but it does have a very friendly and accessible Pascal-like syntax, while also having a state of the art linear type system.

Re: Why use Pascal?

#39

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.

Re: Why use Pascal?

#40

first word they use to justify using Pascal is that it's "modern". Gave a glimpse at the code source screenshot. No, that syntax is very much the past.

The syntax that has influenced Kotlin, Scala, Rust, Typescript, and the various ML.

Yeah, really old fashion.

Post reply on HN