Live data from Hacker News

Why I use Object Pascal

dubst3pp4.github.io

81–90 of 235 posts

Re: Why I use Object Pascal

#81
post #80

I've lately been trying out FreePascal for building my indie games (which have in the past been in C, Python, Java, Objective-C, and finally JavaScript), and it's going well enough. There's certainly room for improvement, and the Lazarus IDE is not at all to my taste, but it's likely to be my next-ten-years language. https://mdhughes.tech/2017/09/02/pascal/ and a couple of followup posts https://mdhughes.tech/categor…

Any early feedback on mobile?

Haven't tried it yet, once I get desktop tech demo stable (hopefully this month, barring work & laziness) and can see it run on non-Macs, mobile's the next target.

No idea how I'll test Android, I'm a Mac and iOS guy, and years ago when I tried the Android IDE the emulator was appalling.

Re: Why I use Object Pascal

#82
I believe the toolchain offers the best cross-platform GUI option right now. In the best case this can serve as a wake-up call to other languages: get your GUI house in order!

Re: Why I use Object Pascal

#83
post #50
post #41

Earlier quoted context omitted.

What makes bytecode a deception though?

If Java and .NET produced executables like C and C++, there would be less need for them. Instead, one is forced to deliver the VM with the application or buy a third party AOT compiler like Excelsior JET, while depending on another language for implementation. This made everyone that cared about writing native executables focus on C and C++, with the respective increase in unsafe code. This is finally changing thanks…

> This is finally changing thanks to D, Go, Swift, Rust, but slowly.

This whole thread has me imagining what it would be like if all the energy that went into Go/D/etc had gone into Free Pascal instead.

Imagine if Free Pascal had a swanky website, and an army of people blogging about this hip, powerful language, all the kids are getting on board, I heard Netflix are re-writing their routing layer in Object Pascal, have you seen the benchmarks for this awesome new non-blocking Pascal web server...

Re: Why I use Object Pascal

#84
post #68

I've tried picking up Free Pascal and, for me, the documentation is lacking. I come from C# where Microsoft has amazing documentation and small examples on how to use just about every single class in the .NET framework. I guess I'm just spoiled with the documentation I have had and need to get used to it.

Did you have a look at https://www.freepascal.org/docs.var and especially at the RTL https://www.freepascal.org/docs-html/current/rtl/index.html and FCL https://www.freepascal.org/docs-html/current/fcl/index.html documentation? I think the Free Pascal team has done a good job documenting nearly everything!

Wow, not sure how I missed that. I was just looking at their Wiki and then there was a page where they had the language spec. This changes a lot. Thanks for bringing this to my attention.

Re: Why I use Object Pascal

#86

What caused pascal to lose out to C? Seems like it was a good language that had developer uptake.

Pascal was great when you were coloring within the lines, but C was more flexible. I don't think I was ever able to do image processing in Pascal, and I shudder to think what it would take to do a device driver.

Pascal was my primary language from about 1980 to 1990, then I transitioned to C and from there to C++. I missed the whole Delphi train.

Re: Why I use Object Pascal

#87

What caused pascal to lose out to C? Seems like it was a good language that had developer uptake.

Price of Delphi. You could have had Visual Studio for $1000, but Delphi for $10k. That single-handedly killed Pascal. Lazarus/FPC was a response to that pricing insanity.

Re: Why I use Object Pascal

#88
As I get older, I'm strongly swinging into the camp that thinks languages should have strongly restrictive syntax. Object pascal is one of those languages which is both low level enough to cleanly map to efficient code, as well as high level enough not to feel really restrictive. Its a language that is completely misunderstood because far to many people read a couple critical essays, and believed everything they read, even though the strongest argument frequently was that its harder to type "begin/end" than "{/}". Which is a pretty lame thing, given code completion in editors as old as emacs.

Put another way, the thought patterns programmers fall into when using it seem to result in code which is easier to understand than most other languages which seem to encourage "perlism" (creating a single unreadable line), "forthism" (creating a billion two line words that combine to solve all the problems in one word), or a few other things which become completely unmaintainable when the project grows beyond what can be written by a over-energetic student in a semester at school.

Re: Why I use Object Pascal

#89
post #83
post #50

Earlier quoted context omitted.

If Java and .NET produced executables like C and C++, there would be less need for them. Instead, one is forced to deliver the VM with the application or buy a third party AOT compiler like Excelsior JET, while depending on another language for implementation. This made everyone that cared about writing native executables focus on C and C++, with the respective increase in unsafe code. This is finally changing thanks…

> This is finally changing thanks to D, Go, Swift, Rust, but slowly. This whole thread has me imagining what it would be like if all the energy that went into Go/D/etc had gone into Free Pascal instead. Imagine if Free Pascal had a swanky website, and an army of people blogging about this hip, powerful language, all the kids are getting on board, I heard Netflix are re-writing their routing layer in Object Pascal, ha…

I did enjoy Pascal a lot, but right now it lost the PR battle.

Its spirit leaves on in languages like Rust, Swift, Kotlin and similar.

It is easier to drive adoption to those languages, than try to convince younger devs to use Pascal, even with a swanky site.

I like your idea, though.

Re: Why I use Object Pascal

#90
post #17
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.

At work, I maintain an in-house application written in Delphi/ObjectPascal. In my case I do not need anything beyond what is supplied by the environment. The UI library is part of the environment, so is the database interface, ... basically, that is all the application needs. Generally speaking, applications that basically are a UI on top of a relational database probably don't need any external libraries. And those…

I don't know about Object Pascal to C++, but calling C libraries is a no-brainier.

There is a bit of a definition wrapping, and then the C library looks like a pascal one, and unlike most interpreted/JIT/GC/etc languages where the programmer or wrapper has to jump through hoops to transform the data structures to match an in memory C structure, pascal just goes ahead and uses the same datastructure. This yields a far more transparent/efficient interface. Even pascal strings degrade to C strings by skipping the size header, and assuring they are null terminated before calling the C libraries.

Post reply on HN