Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've written a lot of Object Pascal (meaning the Delphi dialect of Pascal, not the older Apple dialect) over the years and... i don't think there is anything special about it :-P. It has a bunch of neat features (and a bunch of not so neat pitfalls) but really IMO the three main reasons to use it is that:

1. It has decent backwards compatibility (code i wrote even 20 years ago compiles either out of the box or with very minimal change - e.g. if you used strings as byte buffers or if you relied on some esoteric RTTI implementation details you may need to change some things but the changes are quick and trivial).

2. Lazarus is a fast and responsive IDE with RAD functionality for making GUIs (and other stuff, e.g. i haven't used it myself much but you can do things like configure visually via the IDE how a webapp will respond to various URLs) and FCL and LCL provide a rich frameworks for desktop applications.

3. The compiler is relatively fast. Delphi's compiler (at least the classic one) is much faster but compared to -e.g.- current C++ compilers, FPC is much faster (it takes less than a minute to compile Lazarus itself and AFAIK the codebase is more than a million lines of code - there is 2 million lines of code in the repo but you don't compile everything).



But linking is slow, plus also only possible using ld.bfd. This causes problems here as I default to gold... For now; each time you start using or close lazarus you have to remind to change ld target.

Otherwise compilation is indeed fast because it uses a system of cache (just like delphi *.dcu system) plus it has modules. On top of that we can add... context-free grammar that's fast to parse, no _insane_ preprocessing (but still some, $ifdef and co).


There are preprocessor macros though you need to explicitly enable them and they don't support parameters (there are workarounds but in practice they're not really needed). FWIW i never had to use them so far, the most i needed from the preprocessor was DEFINE/IFDEF/ENDIF/etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: