3 ms·
Similarly, I'm trying to find high-quality retrospectives on Pascal vs C. (I'm still trying to understand today if there is good reason [other than Lazarus and
by eatonphil 5y ago
Similarly, I'm trying to find high-quality retrospectives on Pascal vs C. (I'm still trying to understand today if there is good reason [other than Lazarus and GUI programming] to use FreePascal over C or C++.) Any links you know of are welcome!
- mikewarot 5y agoThe main issue is (and always has been, in my opinion) that "Standard" pascal sucks in that it doesn't have standard libraries, and thus all of them were just a little too different from each other. Delphi (and Lazarus/Free Pascal) have a largely compatible and sane set of libraries that include quite sane string handling (you never allocate or deallocate them, the have length, and can contain nulls without issue) The latest versions of things include generics, so you can make lists, trees, etc of your defined record type with little to no trouble. Separate compilation of Units means that I almost never wait for a compile... it is always sub-second from hitting F9, to seeing the thing run. The two-way tools to edit forms are one of the most productive I've ever seen. Borland C++ built a lot of boilerplate to make up for the C++ impedance match with their VCL libraries, that you couldn't tinker with, or things broke. Delphi/Lazarus don't have that issue. Lazarus doesn't support GIT integration directly, yet, as far as I know. If you are doing personal projects, there's no reason not to use it.
- bnastic 5y agoIirc, Borland literally had to add closures to C++ to make their C++ Builder work and be as simple as Delphi in the UI editor.
- wirrbel 5y agoA random comment won't qualify as high-quality but I have a fond relationship with Pascal, since I learnt programming with a Turbo Pascal book that was on the shelf in my local library and since Turbo Pascal gave weird error messages (due to clock speeds as it turns out), I found Freepascal that I could get from the internet via dial-up connection. FreePascal's Object Pascal is is a nice language, pascal alone gives you an environment similar to C, with Object Pascal you get some polymorphism (classes and methods). What's of course missing in comparison to C++ is templates, so as soon as you build containers you will find yourself casting again. If you want to have a slightly-more-high-level language than C, it may work out. Especially the Unit-System allows for better modularisation and definitely is an improvement over include-headers. For most applications nowadays I would like to have a GC in place, which kind of makes me wonder whether Modula/oberon would be the more natural choices nowadays for choosing a pascal-esque language. But then I quickly end up picking SML/ocaml because once you have a GC, you quickly want a couple of other niceties unless you really want to have a bare-metal language.
- CRConrad 5y agoI'm thinking, perhaps the non-visual bits of the LCL: Data modules, and everything you can place on them. The (Borland-clone) data set abstractions and swappable "drivers" still make database-centric apps a joy to develop (IMO, from what little I've tested it).