Live data from Hacker News

Why use Pascal?

castle-engine.io

231–240 of 516 posts

Re: Why use Pascal?

#231
post #200
post #189

Earlier quoted context omitted.

Reliably deploying C# desktop app is total nightmare in comparison to single exe generated by Delphi's / Lazarus.

C# can generate single executables now.

Kind of.

Depends if we are speaking about Xamarin/Mono AOT, .NET Native, Native AOT or IL2CPP.

Each of those ones has plus and minus, none of them allow to pick a random .NET application and just compile it straight into native code.

Re: Why use Pascal?

#232
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…

The Object Pascal as originally created by Apple, not.

The Object Pascal adopted by Borland, and evolved into Delphi, is on par with plenty of C++ capabilities, given the Delphi/C++ Builder symbiotic relationship.

Re: Why use Pascal?

#233

Related, and of interest, IMO: Delphi – why won't it die? (2013) https://news.ycombinator.com/item?id=7613543

The funny thing about that, is here we are in 2023. Lots of its competitors and haters are likely still asking, "Why won't it die?"

TIOBE index has Delphi/Object Pascal ranked at #11. That's ahead of "top players" like Go, Rust, and Swift.

Re: Why use Pascal?

#234
post #66

Earlier quoted context omitted.

> 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 compiled languages, even those with GC. You're selling it short. Firstly, as the other poster downthread pointed out, it benchmarked as fast as C++ in the past. Secondly, it's main use is local gui apps, and there's nothing I've seen, includi…

> it benchmarked as fast as C++ in the past Does this mean it's no longer as fast as C++ today? Do you have specific benchmark results?

Delphi and C++ Builder share the same compiler backed.

Nowadays it is based on LLVM.

Re: Why use Pascal?

#235

Earlier quoted context omitted.

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.

Where does Microsoft use Scala?

Or every bank out there?

Re: Why use Pascal?

#236
post #230
post #106

Earlier quoted context omitted.

Go has surprisingly little in common with Oberon or Modula (mostly the receiver syntax of Oberon-2 bound procedures). The coroutines were not a language feature of Modula, but a library feature; also the Oakwood guidelines of Oberon (not by the original authors) include a coroutine API, but I'm not sure whether there was a working implementation.

golang is basically newsqueak

Go is basically Limbo + Oberon-2

Re: Why use Pascal?

#237
post #76

Earlier quoted context omitted.

Delphi allows inline variable declaration but Free Pascal does not (the developers explicitly decided against implementing it). Note that in Pascal (FPC, Delphi, whatever) you can have nested functions so this isn't that much of a limitation as it sounds. For example if i have a procedure that is very long i often end up splitting it in multiple nested procedures and each one has its own variable section. Also from a…

> Delphi allows inline variable declaration it may do so now, but for the longest time it didn't, which made it compare poorly with C++ and even with C, which allows definitions in a scope. in fact the OP concept of scope is a bit crap - basically the whole function,

Your concept of Object Pascal scope is also outdated, in relation to Delphi.

Re: Why use Pascal?

#238
post #233

Related, and of interest, IMO: Delphi – why won't it die? (2013) https://news.ycombinator.com/item?id=7613543

The funny thing about that, is here we are in 2023. Lots of its competitors and haters are likely still asking, "Why won't it die?" TIOBE index has Delphi/Object Pascal ranked at #11. That's ahead of "top players" like Go, Rust, and Swift.

In Germany we keep having a Delphi / C++ Builder developers conference, and maybe due to their relation to Anders, it is not surprising to see related articles on the .NET Developers Magazine.

Re: Why use Pascal?

#239

We need to bring back Oberon. Fast compile times, automatic memory management, live environment.

It was great for its time, nowadays we would be better off having a similar experience based on Go, C#, D,...

Re: Why use Pascal?

#240

Earlier quoted context omitted.

i do not think you understand the concept of scope.

I’ve written a few compilers in my time so I have some idea about scoping rules ;) As I and other have already said, it depends on the specific language. Some languages scope local variables at the function level (irrespective of {} or Begin End), and other languages scope local variables inside the containing {} or Begin and End block. In that regard {} and Begin End serve identical purposes of defining a local exec…

this post is specifically about pascal - my comment about {} vs begin...end was intended for that context. pascal has no way of defining variables within a local scope - it was added to delphi as a kludge much later. i admit i should have said something like "... {} in C and C++".
Post reply on HN