logoalt Hacker News

applfanboysbgon • yesterday at 2:06 PM • 4 replies • view on HN

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.


Replies

mickeyp • yesterday at 4:42 PM

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.

➕ show 2 replies
lelanthran • yesterday at 2:35 PM

> 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).

➕ show 1 reply
sakesun • yesterday at 10:47 PM

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 !

pjmlp • yesterday at 2:23 PM

Comptime is the only thing going for it.

Object Pascal compilers were already super fast in MS-DOS hardware!