‹ BackHN Continuity

Thread

Modern Object Pascal Introduction for Programmers

204 points · 90 comments · birdculture

  1. baranul · · focus · HN ↗
    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.
    1. pjmlp · · focus · HN ↗
      Yeah, it was pity that Borland lost its way, and Apple decided to refocus from Object Pascal into C++.

      Otherwise it would still be a big contender.

      Everything that Zig offers over C as selling point was already there in Object Pascal.

      1. applfanboysbgon · · focus · 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.
        1. mickeyp · · focus · HN ↗
          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.

          1. tliltocatl · · focus · HN ↗
            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.
            1. applfanboysbgon · · focus · HN ↗
              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.
              1. klipt · · focus · HN ↗
                Golang is also designed to compile very fast.
                1. applfanboysbgon · · focus · HN ↗
                  Yes, I do appreciate Go's existence as well.
                  1. jan_m_savage · · focus · HN ↗
                    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.
                    1. pjmlp · · focus · HN ↗
                      Oberon-2 surely, there are zero Modula-3 influences in Go.

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

                      1. jan_m_savage · · focus · HN ↗
                        "Go is mostly in the C family (basic syntax), with significant input from the Pascal/Modula/Oberon family"

                        source: <a href="https:&#x2F;&#x2F;go.dev&#x2F;doc&#x2F;faq" rel="nofollow">https:&#x2F;&#x2F;go.dev&#x2F;doc&#x2F;faq

                        Without Pascal there would be no Modula.

                        1. pjmlp · · focus · HN ↗
                          Modula-3 where is it?

                          I do agree with Modula, which isn&#x27;t the same as Modula-3.

                2. baranul · · focus · HN ↗
                  This includes some languages inspired by Golang, that have &quot;inherited&quot; Pascal influences, such as Vlang. There&#x27;s also a focus on fast compilation and being useful for prototyping.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.