It's amazing how underestimated the Object Pascal language is. Certain people or rivals want to write it off or declare it's "dead", yet the language (including various dialects) are still going strong.
Comptime? Vastly superior toolchain? Trivial C interop? Sub-second incremental compilation in large projects? I'm not familiar with Object Pascal at all, so do correct me if I'm wrong, but I'd really be surprised if it has much of Zig's standout features.
> Comptime? Vastly superior toolchain? Trivial C interop? Sub-second incremental compilation in large projects?
No comptime, but everything else, sure, Turbo Pascal (and then Delphi) had.
Maybe it'll blow your mind (not sure if you find this impressive or not), but Turbo Pascal had sub-second compilation per module on large modules back on my 486 with 4MB of RAM.
Sure, Zig has more features than Pascal, but not the ones you listed (except, of course, for comptime).
And still does. You can get the latest version of Delphi (including a free version for non-commercial use) here: <a href="https://www.embarcadero.com/products/delphi" rel="nofollow">https://www.embarcadero.com/products/delphi
It rocks.
You're also not limited to Delphi. You can use Oxygene <a href="https://www.remobjects.com/elements/oxygene/language" rel="nofollow">https://www.remobjects.com/elements/oxygene/language
> You're also not limited to Delphi. You can use Oxygene <a href="https://www.remobjects.com/elements/oxygene/language" rel="nofollow">https://www.remobjects.com/elements/oxygene/language
If you're not in the mood to rent your compiler, you can also try Lazarus.
Delphi would compile & link 2 MLOC of code on a crappy work laptop in 30 seconds to a minute. Incremental compiles were instant. So fast most developers never bothered learning the "go to next error" hotkey and just spammed F9 (compile & run) whenever they fixed a syntax error. It was that fast.
Trivial C interop - yes. Both pascal and cdecl style calling conventions.
Toolchain? Back then - yes. Today? Probably not; depends what you mean by it. It had perfect COM interop which mattered back then, and you could trivially link stuff if you wanted to. And people did.
Comptime here means not "compilation time", but rather ability to run some your code during compilation (i. e. compile-time metaprogramming). Pascal didn't had this.
They probably know that. I specifically mentioned actual compilation time as another one of the things that's great about Zig, so it is relevant to mention. Certainly the language sounds nice from what I'm hearing. These days most languages are deeply neglecting compilation time as a feature (interpreted languages aside), so Zig is a breath of fresh air for me in that regard.
Go directly is inspired by Modula-3 and Oberon-2, both are descendants from Pascal family. One of the Go's fathers was Wirth's students IIRC.
This includes some languages inspired by Golang, that have "inherited" Pascal influences, such as Vlang. There's also a focus on fast compilation and being useful for prototyping.
> most developers never bothered learning the "go to next error" hotkey and just spammed F9 (compile & run) whenever they fixed a syntax error
We didn't know we were privileged. I thought it was normal thing to have.
Object Pascal has more runtime reflection features which were added to facilitate visual programming paradigm. Do you know what can be faster than sub-second incremental compilation ? Run-time/Design-time manipulation !
This is the modern Object Pascal. Here's the Turbo Pascal syntax: <a href="https://en.wikipedia.org/wiki/Object_Pascal#Heap_based_allocation" rel="nofollow">https://en.wikipedia.org/wiki/Object_Pascal#Heap_based_alloc... - if we're comparing something that was around the same time as C++.
I recall the turning point was when id used the Watcom compiler for DOOM. Watcom had the 32-bit flat model DOS extender and were starting to add the difficult optimizations. Turbo/Borland Pascal was built for compile and link speed, not even getting a real -O option until Delphi (except for turning off range and stack checking)
I am talking about Apple after Jobs was kicked out.
You missed the part where NeXT licensed Objective-C from Stepstone, Apple bought NeXT as last survival action before bankruptcy, and OS X sprung out of NeXTSTEP.
baranul · · focus · HN ↗
pjmlp · · focus · HN ↗
Otherwise it would still be a big contender.
Everything that Zig offers over C as selling point was already there in Object Pascal.
applfanboysbgon · · focus · HN ↗
pjmlp · · focus · HN ↗
Object Pascal compilers were already super fast in MS-DOS hardware!
lelanthran · · focus · HN ↗
No comptime, but everything else, sure, Turbo Pascal (and then Delphi) had.
Maybe it'll blow your mind (not sure if you find this impressive or not), but Turbo Pascal had sub-second compilation per module on large modules back on my 486 with 4MB of RAM.
Sure, Zig has more features than Pascal, but not the ones you listed (except, of course, for comptime).
andsoitis · · focus · HN ↗
And still does. You can get the latest version of Delphi (including a free version for non-commercial use) here: <a href="https://www.embarcadero.com/products/delphi" rel="nofollow">https://www.embarcadero.com/products/delphi
It rocks.
You're also not limited to Delphi. You can use Oxygene <a href="https://www.remobjects.com/elements/oxygene/language" rel="nofollow">https://www.remobjects.com/elements/oxygene/language
lelanthran · · focus · HN ↗
If you're not in the mood to rent your compiler, you can also try Lazarus.
andsoitis · · focus · HN ↗
Also, for non-commercial use, Delphi is free.
mickeyp · · focus · HN ↗
Trivial C interop - yes. Both pascal and cdecl style calling conventions.
Toolchain? Back then - yes. Today? Probably not; depends what you mean by it. It had perfect COM interop which mattered back then, and you could trivially link stuff if you wanted to. And people did.
tliltocatl · · focus · HN ↗
applfanboysbgon · · focus · HN ↗
klipt · · focus · HN ↗
applfanboysbgon · · focus · HN ↗
jan_m_savage · · focus · HN ↗
pjmlp · · focus · HN ↗
Also Wirth had nothing to do with Modula-3, that was all DEC / Olivetti SRC work, done by ex-Xerox people with experience on Cedar and Modula-2+.
jan_m_savage · · focus · HN ↗
source: <a href="https://go.dev/doc/faq" rel="nofollow">https://go.dev/doc/faq
Without Pascal there would be no Modula.
pjmlp · · focus · HN ↗
I do agree with Modula, which isn't the same as Modula-3.
baranul · · focus · HN ↗
mldbk · · focus · HN ↗
> most developers never bothered learning the "go to next error" hotkey and just spammed F9 (compile & run) whenever they fixed a syntax error
We didn't know we were privileged. I thought it was normal thing to have.
pjmlp · · focus · HN ↗
Ironically it is still easier in Delphi than the frameworks Microsoft keeps pouring out for .NET and C++.
I keep joking they should afford some Embarcadero licenses to learn how to actually do it.
sakesun · · focus · HN ↗
ape4 · · focus · HN ↗
pjmlp · · focus · HN ↗
cyberax · · focus · HN ↗
But it _did_ have range checks for array access.
cisc · · focus · HN ↗
What's an example of the pain?
cyberax · · focus · HN ↗
cisc · · focus · HN ↗
<a href="https://docwiki.embarcadero.com/RADStudio/Florence/en/Pointers_and_Pointer_Types_(Delphi)#Overview_of_pointers" rel="nofollow">https://docwiki.embarcadero.com/RADStudio/Florence/en/Pointe...
<a href="https://castle-engine.io/modern_pascal#_pointers" rel="nofollow">https://castle-engine.io/modern_pascal#_pointers
cyberax · · focus · HN ↗
cisc · · focus · HN ↗
Object Pascal's pointer syntax is detailed in the links I gave you.
[deleted] · · focus · HN ↗
[deleted]
cyberax · · focus · HN ↗
pjmlp · · focus · HN ↗
sehugg · · focus · HN ↗
pjmlp · · focus · HN ↗
LoganDark · · focus · HN ↗
IIRC Apple went and made Objective-C(/C++) and then eventually Swift. Not sure if they actually embraced C++ all that much - did they really?
pjmlp · · focus · HN ↗
I am talking about Apple after Jobs was kicked out.
You missed the part where NeXT licensed Objective-C from Stepstone, Apple bought NeXT as last survival action before bankruptcy, and OS X sprung out of NeXTSTEP.
LoganDark · · focus · HN ↗