Live data from Hacker News

Why I use Object Pascal

dubst3pp4.github.io

1–10 of 235 posts

Re: Why I use Object Pascal

#2
How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly?

I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

Re: Why I use Object Pascal

#4
post #2

How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

Delphi does have some choices in that space. https://github.com/Fr0sT-Brutal/awesome-delphi/blob/master/R...

Re: Why I use Object Pascal

#5
post #2

How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

It is easy to create bindings to the C-libraries you need, see http://wiki.freepascal.org/Creating_bindings_for_C_libraries.

But FreePascal has many native libraries for all kinds of stuff...

Re: Why I use Object Pascal

#6
post #2

How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

Maybe this answers your question:

> But beside this historical excursion, what are the reasons that I use Free Pascal in my personal projects?

Re: Why I use Object Pascal

#7
post #2

How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

In my experience (talking FreePascal/Lazarus here, as I'm on Linux most of the time), the library situation is not that bad, actually. The standard lib has most of the mundane stuff, and a little github-searching can often find a working version of more specific stuff (like SSH2 which I needed recently).

To the contrary, in some areas (like GUI tooling) it is far far beyond newer alternatives like Go.

Also, I think the higher level of the language than C/C++ etc can make it easier to develop your own solution, should you have to.

Re: Why I use Object Pascal

#8
post #2

How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

It depends on what you’re trying to do. In delphi you get a huge class library out of the box, and mostly you don’t need much else. There’s also still much third party stuff around the web from its glory years. The tricky part is interfacing with new external systems, and there it’s usually a matter of calling into a C library, which is easy to do.

I’ve found PHP to be trickier actually, because if there’s no extension to connect to the system you want, you don’t have a real fallback plan except writing your own extension in C.

Re: Why I use Object Pascal

#10
post #2

How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

It's not a full answer to your question but I've sometimes found creative solutions to avoid FFI or ports. A good example I saw was someone who wanted to draw some 3D things generated in an obscure language without GL bindings, so they made a small external program in another language that took textual GL commands on stdin.
Post reply on HN