Comment by Havoc

Comment by Havoc 2 days ago

13 replies

Pascal/Delphi - especially in the educational context.

Crazy fast compiler so doesn't frustrate trial & erroring students, decent type system without the wildness of say rust and all the basic programming building blocks you want students to grasp are present without language specific funkiness.

chadcmulligan 2 days ago

Delphi isn't dead - ver 13 was recently released - https://www.embarcadero.com/products/delphi. It's even cross platform, uses Skia as its graphics engine, its all very nice.

eloisant 2 days ago

Apparently Python is now the language of choice for teaching programming, and I'm a bit worried about it because the type system is a mess.

I think Pascal or ADA are better language to start learning about types with a good base.

le-mark 2 days ago

Iirc Delphi didn’t have threads, sockets, or OS integration (signals, file watching …). So it wasn’t suited to systems programming ie servers and services. It nailed gui applications, and that was a lot. Maybe freepascal has threads and sockets but imo it was too late.

  • badsectoracula 2 days ago

    Delphi 2, the first 32bit version of Delphi, had all of this. Some, like threads, even had wrappers (TThread), but Delphi came with Win32 bindings out of the box so all Win32 functions were available too - and it came bundled with documentation for the APIs. In addition, calling out to a DLL was trivial so even if a function wasn't available, you could just define it. Pretty much anything you could do with a C compiler was possible with Delphi 2 too.

    Free Pascal obviously has all of that stuff too.

  • Havoc 2 days ago

    Not sure earlier versions, but Delphi 5 (~1999) definitely had all those. Plausible that it was added much later than in C/C++ world though

  • detaro 2 days ago

    Maybe not in the earliest versions, but by the late 90s, when I learned it, it certainly had those things.

  • chadcmulligan 2 days ago

    I have written a number of services in Delphi, some 20 years ago, all works fine.

  • rs186 2 days ago

    Eh, sounds like that wouldn't be a problem for education purposes as the parent suggests? You need to be doing some really specific to leverage threads/file watching. And people probably use C to teach threads anyway.

    Of course, being a good teaching language probably doesn't make the language popular or even survive. Python is so widely used not necessarily because it's simple to learn but because of its ecosystem.