4 ms·
Free Pascal implements Object Pascal. Not used it in a while but I was a Delphi programmer years ago. Object Pascal is a decent language, it implements most o
by noir_lord 11y ago
Free Pascal implements Object Pascal.
Not used it in a while but I was a Delphi programmer years ago.
Object Pascal is a decent language, it implements most of the OO features you'd expect in a 'modern' language.
It has very nice data type support via records, nice out the box string support, it supports properties with optional read/write specifiers (really useful). The usual stuff in terms of interfaces and generics.
It's unit system is clean, clear and unambiguous.
Moving away from the language it's compiler is very fast as is the output, it's generally in the same order of magnitude as C++ or Java (https://benchmarksgame.alioth.debian.org/u64q/pascal.html https://benchmarksgame.alioth.debian.org/u64q/pascal.html the always unreliable in the realworld benchmarks).
- systems 11y agoanother question please i believe cross compilation (ability to compile to many platforms from one source code, from one dev machine and target many other platforms) and the ability to easily mix assembly with code are touted as some of freepascal/lazarus special features/edges, is this correct, or is this not very special or particularly powerfull in freepascal/lazarus
- ALB42 11y agoEspecially powerful is the LCL (Lazarus component library) a GUI wrapper library which makes it possible to "write once compile everywhere" (Slogan of Lazarus). An in difference to QT or gtk and such toolskits it looks native on every platform because in the backend LCL can use GTK, GTK2, QT, Win-API or in this case MUI to create the GUI, so the application look not like aliens but native.
- narag 11y agoLast time I asked, cross compilation is not easy feat. No problem compiling the same source for different targets, but from the same machine? There's no easy way, specially for Macs. Mind you it's not impossible, but it's not the recommended path. Assembly you can insert it directly in code. To reconcile that with the prior question, use ifdefs. Edit: the reason they gave me is that the linker (IIRC, GNU tools) needs the target DLLs to work properly. A good solution would be using a Mac as development machine with VMs for the rest of targets.
- noir_lord 11y agoNot sure they are special features as other languages have them but Free Pascal does have excellent cross-platform support and yes using assembly inline is pretty nice. Also the LCL is great in that they implement it for a lot of the platforms they support so you can do RAD on Windows and (fairly) easily get the same program running on Linux and vice versa.