Couple of observations:
- Using C (Borland or Microsoft) required two floppy disks - one for the compiler, one for the linker. With most of the Pascal versions you end up just needing one floppy disk, later it didn't matter as we moved to HDD.
- First "terrible" experience (by a friend) - he moved from Pascal to C and placed all his code in the .h-eader file, and was wondering why it takes so much to compile (oh, yes nowadays it's fashionable to have header-only libs, lol), but then it was awful.
- Pascal Units enforced you (as explained in the article) to figure out cyclic dependencies, unfortunately lots of us thought of this as a limitation, which C/C++ did not had. How wrong we were!
- There was barely any use of preprocessor (yes there was), and it was more into the language, than some external pre-processor.
- Mark/Release was superior, but also harder to understand the idea than plain old malloc/free
* Mark - "Records the state of the heap in a pointer variable".
* Release - "Returns the heap to a given state".
* So you can quickly release memory in one hop (like nowadays what json parser might need to do).
- Turbo Pascal 3.0 was only 30-40kb - Even later Borland could keep up to a single disk. Assembly was approachable from it
- Peephole optimization!https://news.ycombinator.com/item?id=36659349
See the thread title to get it (90s developer ...)
And:
Why use Pascal?
Hobbyist Borland was the best Borland. A really amazing company that fully embraced those original tinkerers... Enterprise <X>, full vomit, but hey, that's where they got to charge many thousands per seat, so you can't really blame them.
I used Turbo Pascal 3 thru 6, but after college migrated towards C/C++ and never had reason to use Delphi professionally or personally.
TSR applications while a bit large than pure .asm were possible!
I just don't understand how people can put up with waiting for compilers, Docker image downloads, and "continuous integration" builds that take upwards of whole minutes. Granted, it takes some effort to get things fast, but it is perfectly possible on modern hardware to have lightning fast compilation, and runtime replacement of modules. For some reason most people just don't care, and it sometimes makes one feel terribly lonely.
Also, inline assembly was really nice!
asm
mov ax, 13h
int 10h
end;I never understand why people use "C" as opposed to C.
Does anyone use "Pascal" as opposed to Pascal?
My school utilized Turbo C++ 3.0 for instruction (and later 4.5), which implemented some weird subset that was pre-C++98. Plenty of things that I was doing when targeting the Borland compiler barfed terribly when compiled with GCC (or G++).
I'd definitely consider what we were writing in those days "C" or "C++" but not anything that resembles modern software...
I'll try to work on that! it got me thinking... why the heck!
I can't imagine this would be at all sound today, if a heap was shared between multiple threads, or if you marked and released the heap across an arbitrary function pointer callback which allocates memory and expects it to remain valid to access until explicitly freed.
Delphi was what I had to use in my first apprenticeship/job, over 7 years ago now.
Came home after the first day and my dad told me that's what he made his first Windows programs with, too - but 25+ years ago!
After learning other languages, I still have to say it's great for quickly putting together GUIs and filling them with life. The community is rather thin these days though.
END
Now that I'm an old coder, it really seems like pointless churn as GUI toolkits are constantly built and rebuilt, often with little to show for performance improvement. I do think CSS was a legitimate boon because it provides such a deep means for specifying appearance preferences and is known by so many people, but ultimately the toolkits are repackaging buttons/text entry/radios in mostly the same way the old 4GLs did, often with worse UI construction tools and much more complicated code.
Powerbuilder and Delphi definitely seemed to have GUI dev figured out, but each language transition needed its own (often worse) GUI toolkit and the GUI builder tools never really came. How long until NetBeans included a somewhat-decent GUI builder? Java had been around like 15 years.
NeXT had a great GUI designer too way back in 1990, although you had to write ObjectiveC for the handlers.
More recently, C# 9 and 10 have returned the concept of `records` (preferably immutable objects) along with the `with` keyword for making copies with some of the properties changed from the source to the dest object.
It has been an interesting decade watching HN metaphorically (and sometimes literally i'm sure) shift around uncomfortable in their chair as the all-encompassing-nightmare M$FT creates two languages that are more and more dominating of developer marketshare - C# and TypeScript.
Although, MS hasn't caused me to generally avoid .Net so much as the more "enterprise" nature of most of the projects I've had experience with. I started with .Net (C#) in 2001, and to this day think there is a lot to like there. Of course these days, I'd appreciate the opportunity to work with Rust more than C#.
Borland Delphi had the best and the most useful documentation/help system that I ever used - and those were times before Google or even access to Internet for many of us, so reading manuals played a huge role in learning.
Too bad, as I really liked it, especially the language. I liked the AMIGA as well, which also was ahead of its time and seemed to suffer a similar fate.
It's an interesting issue, personally I wouldn't look at someones employment history, and working with legacy tools/environments, as a black mark, but it could be indicative of someone who simply refuses to move to new technology.
I've also hired some younger people who were actually interested in picking it up because they were keen to learn anything they could, and you can learn plenty from Delphi despite it's warts.
Over time I've described myself as suffering a kind Stockholm Syndrome w/ Delphi now, and some of the guys on my team have flat out refused to learn it for maintaining some of our systems.
What was/is particularly nice about Delphi is the library of GUI objects, single .EXE output with no dependencies, and the ease with which arbitrary-length strings can be used.
Data binding to client-server databases was a big deal at the time, and data-bound controls such as grids and TreeViews (which we all thought were the future) were pretty cool. It was an exciting and productive time to build data-based (enterprisey) apps that customers and users loved.
I remember when Borland launched C++ Builder, which was C++ using the Delphi component library (VCL) and IDE. Everyone was very excited during the demo until build and run (F9?) when compiling started and in the demo, in front of a couple of hundred people, my friend had to talk for a couple of minutes until the app ran - something that would have taken seconds in Delphi.
In it's day, Delphi was pretty cool.
Delphi could have potentially navigated into the web era quickly enough, but was slow to do so. It was essentially a Windows product at its core. They made a half-hearted attempt to port it to Linux but did so using Wine(lib) which back then was very rough, so Kylix had a poor UX and of course the problem was that the Delphi widget toolkit was the Windows toolkit which Linux didn't have. IIRC it was also quite slow to even get things like an HTTP stack, which had to be produced by a third party company.
The focus on visual componentization back then was kinda great though. That's definitely something that went AWOL somewhere along the line. The good database integration is also sorely missing in more modern languages and frameworks.
It is a sweet revenge that most modern languages, have decided to go with the Pascal influenced approach (yes some ML as well), even most of the C++ wannabe replacements (with exception of Circle).
"However, for Linux, you cannot create the visual VCL and FireMonkey applications."
These days I recognise the immense potential it had, and lament the fact that I never had the chance to learn it properly. My path was Borland Turbo C++, VB6, VC++6 then I moved to the Linux world.
I don’t know if this makes sense but I was feeling nostalgic for turtle graphics.
At the time I'd used VB but the runtime was the size of a floppy on its own, and the catalogue data pushed it over the size. I remember reading that Delphi didn't require a runtime and that was that.
I still use Delphi for LOB apps - so very quick to design a user interface and have a working program ready to roll out, for example so transport can update their haulier quickly, or the accounting software has a shoddy smtp implementation that doesn't play well with our spam appliance so we create a tool that fires statements via mapi and let outlook deal with retries.
But I heavily disagree with the author's positivity about Delphi in general.
The UI builder excels on wiring up small utilities, but when you are looking to build applications with more complex UIs, with custom components and/or devices with different screens, the complexity increases exponentially and the UI preview becomes just a small suggestion, I think only in the last release (10.5) in 2022 they addressed this.
The component system is clunky, and very prone to breaking. In my entire time working with it I never once had a completely functional development environment, because components installation never had the same result. To work in some parts of the project i had to just ignore the IDE and edit the text files directly. Also, Delphi updates required reinstalling everything, and solving the many problems that would arise, and then all dev environments would have to be reconfigured (and troubleshooted) manually.
Talking about editing, the IDE's performance is not very good, and the Intellisense is not asynchronous, the suggestions and error checking took their time to load, and the IDE becomes unresponsive while it processes, and sometimes windows would just kill the application because it was not responding. I had to turn it all off to be able to work. Oh.. And the bugs, the IDE had bugs just everywhere!
The above exposes a problem in the language itself, it did not have good asynchronous behavior, and I never understood it completely, the only way to make sure you would not block the main thread in some way was to spawn a new process to run background stuff.
The standard components are outdated, the WebView they used was Internet Explorer's one until the 10.4 release, in 2021, they just recently started to adopt WinUI, so you were stuck with 00's user experience, their JSON parser was not very standard (it didn't support the number type, for instance). And when I searched community components to implement things I usually found only something very outdated and unmaintained, or just didn't find anything.
I think essentially it had some quite good ideas in the beginning, but this is the important fact, it "had". Delphi stopped improving on itself, and is just trying to convince the same community of people who fell in love with it when it was still good and dedicated their entire careers to it that they are cool now, adding things that sound cool, while nothing important really improves.
The whole point of Mark Antony's speech is that he was, in fact, praising Caesar, despite the line stating otherwise. Flipping it around removes the entire impact of the speech.
The packages[0] directory of FPC contains a lot of stuff that come out of the box with the compiler and they often have an "examples" and/or "tests" directory with code you can check. There is some documentation[1] but sadly FCL is really not that well documented - you just have to check the sources for most things.
Note that this is for Free Pascal itself. Lazarus builds on it (LCL, the "Lazarus Component Library", is built on top of FCL) and adds a bunch of additional components of its own. Though usually for non-GUI stuff you just use the Free Pascal classes, Lazarus has some of its own "wrappers" that integrate with the IDE and the form/object designer. The "weblaz" package (it comes with Lazarus but you need to install it manually from Package -> Install/Uninstall Packages) provides a bunch of components for working with the web (mainly for making web apps), including the "TFPHttpClient" component which can be used to make HTTP requests. As a simple example, if you throw a TMemo (multiline text editor) control in a form, throw a TFPHttpClient component and then doubleclick on the form to edit the code to execute during the form's creation you can type "Memo1.Text:=FPHTTPClient1.Get('https://news.ycombinator.com/');" and it will put the HTML code for this forum in the memo (note that you may also need to add the opensslsockets unit in the uses section at the top of the code). Of course that is a very simple example but if you browse the properties and events of the component in the object inspector as well as the available methods by typing "FPHTTPClient1." and pressing ctrl+space in the code editor you can find most of the other functionality the component provides.
[0] https://gitlab.com/freepascal.org/fpc/source/-/tree/main/pac...
[1] https://www.freepascal.org/docs-html/current/fcl/index.html
However, given I've yet to find Delphi code that straight up compiles in Lazarus/FreePascal, you probably have your work cut out for you, but if you google for [superobject/indy] for Lazarus, others have started those hikes, and you may find there are working versions of one, or possibly both of them. I've never looked.
Having said that I've done a couple of my own projects at home in Lazarus. It's fine, it feels dated, going back to the original Delphi / VB style of RAD tool with form designer/code editor as floating windows etc. The intellisense leaves something to be desired, but I can't be too critical because it's not like I'm putting my hand up to contribute to the project. If you look at what you get for what you pay for, it's quite literally amazing.
Note that if you install the "anchordockingdsgn" and the "dockedformeditor" packages you will get a UI that uses a single toplevel window with all the previously floating windows being docked inside it (you can still un-dock them) and a form editor that is inside the window (without the "dockedformeditor" you can still get the single window for the IDE but form editing will happen in floating forms).
Personally i prefer the floating windows UI as i overlap windows a lot (and i'm used to it - also i have a dedicated virtual desktop for coding which helps), but there are enough people who prefer a single window UI that this should work without issues these days (it used to be somewhat very unpolished at the past, like installing the package and having a shotgun blast in the IDE panels :-P so you'd spend a few minutes moving and resizing the panels in sane places).
How so?
C++20 Modules, .NET Assemblies, D modules, Ada packages, and plenty of other othes.
Also, Turbo Pascal did indeed allow for circular dependencies between units, as long as the related uses statements were written in the implementation section of the unit, and there were no public dependencies.
Thanks to bitsavers, Turbo Pascal 5 manual, page 97,
http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/tur...
There's also the issue that when you split out units, and then you have a user who wants to consume say, a library you've written, you then have to document "Ok, to use this you have to use X, Y, and Z units for type definitions"
A better approach is to have a single "entry point" unit if you will, that simply re-declares all of the types from the X,Y,Z units, so that when you go to use the code you've written, you only have to import W, and get all the type defs already. (Hard to explain what I'm talking about I guess)
Go forbids circular dependencies.
I think the UX was fine as it was made to work with KDE1/Qt1 which was very Windows-like (in appearance and behavior) at the time, but the real issue was that instead of trying to make VCL work crossplatform (like Lazarus' LCL does) they made a different framework (IIRC it was called CLX) which used Qt1 and was very incompatible.
They released a free version with the limitation that your program had to be GPL, though at the time it was fine as GPL wasn't the boogieman it is today. Sometimes i wonder if Borland had released the entirety of Kylix under GPL and thus gained mindshare among open source programmers at a time when Linux had started becoming more popular among programmers if things would be different for Delphi - if nothing else it wouldn't be seen as some ultra-expensive tool that people only use because they have no way to move away from. At the time Borland made money from enterprises (which would buy the expensive enterprise version anyway) and proprietary desktop software developers (which wouldn't use the GPL version anyway) so having Delphi as a GPL'd program wouldn't affect them much but instead have the tool's mindshare expand and even have developers help Borland fix bugs with their framework and improve their compiler.
I was thinking that a couple of years ago when i tried the free version of Kylix under my Linux installation and it failed to work with all sorts of errors despite my efforts - but errors that should be simple to fix if the source code was available. Then i tried it in a VM running some Linux version from the early 2000s and it worked, which made me think how nice it'd be if it was a GPL'd software i could modify.
After that nostalgia session, i deleted the VM, downloaded the latest version of Lazarus and fixed the Gtk1 support[0] because i could as that is open source (ok ignore the broken images, that is because the shot is from a few months ago when i tried to remove the gdk_pixbuf dependency, normally they look fine but that is the only screenshot i had around :-P). FWIW the fixes were merged in (and i made some extra fixes since then).
Us Architecture Gods don’t need planning. The internal interfaces have been immaculately conceived in our mental space. It’s the regular peasantry of architecture that need to do the planning.
(To be more precise, I've seen C in quotes multiple times and maybe that's because one letter looks too small to be a name to some people, but I don't think I've ever seen C++ in quotes before.)
I don't remember Delphi packages, indeed. It was a long time ago now.
IF I had to BEGIN a comment, I would say that FOR a WHILE I thought it was the END.
# ;)
As a counterpoint to your comment, I make a living writing high-quality libraries. Everything I make is "in the box", but its not hard to improve on that.
My most popular tools are around string functions, json and xml readers/writers and network functionality.
So, on one hand I'm selling ice-cream in Alaska, on the other hand, it's good ice-cream.
It's a small market, a pimple on a niche, but its big enough to keep me going and that's big enough for me.
I did 13 years with Delphi, full time.
We upgrade every year or so, and in almost all cases it's smooth sailing.
Delphi has been quite good so far when it comes to long term maintenance.
First they deprecated the bundled DB bindings, after hyping them to hell and back; then the bundled report generator. We had more than a million lines of code depending heavily on those.
Even library developers are pretty good at pumping out versions of their libs that have support for even Delphi 5. I know of at least 2 people who are still doing windows dev on Delphi 5 or maybe 7, I can't recall.. the very definition of "from my cold dead fingers".
Suffice to say if you were one of those real hold-outs, not updating to the latest.. you wouldn't have generics, dynamic arrays, lambdas/anonymous functions, and you would probably struggle to grab much code written in the last decade and compile it straight up.. but that would probably be the case for a number of languages that have had core features added to them over time.
The fact that the system is proprietary certainly is an issue, but every install always ships with all the source code of the RTL, VCL, and clear instructions on how to compile it with a "you're on your own now" sense of adventure.
As in, new one tomorrow, or in a week. Wish project timelines matched ;-)