5 ms·
Why would one choose Pascal as a basis for a new development ? I ask the question in a fair way and as someone who has written a lot of code in TurboPascal ages
by wiz21c 9y ago
Why would one choose Pascal as a basis for a new development ? I ask the question in a fair way and as someone who has written a lot of code in TurboPascal ages ago (and enjoyed it enormously). I wonder what it feels to develop production code with Pascal compared to say Java or Python. From those days, I remember the speed of the compiler (but my projects were not big) and the clean language.
- jakobdabo 9y agoI like Pascal for its simplicity and clean syntax. The modern Pascal is not the same old language as in Borland's Turbo Pascal from the 80s, it's developing, it even has generics - see the "Modern Pascal Introduction" article[0] by Michalis Kamburelis. Also, quickly (or rather rapidly, as in "RAD") creating truly native and cross-platform GUI applications using Lazarus IDE is the killer feature for me. [0] - http://castle-engine.io/modern_pascal_introduction.html http://castle-engine.io/modern_pascal_introduction.html
- pjmlp 9y agoTurbo Pascal in the early 90's was already quite modern, to the point C felt dated versus Turbo Pascal 6.0. :)
- badsectoracula 9y agoGenerally, you get to use a high level object oriented language that feature-wise is somewhere between C++ and C#, but with a much faster compiler and without any sort of runtime requirements (compared to C#). Free Pascal creates standalone executables that can be as small as 40KB, which is something you mainly see with C and C++ compilers these days (and languages that "compile" to C). TBH there isn't really a killer feature in Free Pascal, something that you can point to at the language and say "this, this is why i am using it". Almost everything it has you can find in other languages. The main and biggest reason -IMO- to use Free Pascal is Lazarus. Personally i use Lazarus a lot and i don't really care much about the language - i come for the framework and the IDE, the language is secondary and i don't care if it is Free Pascal, D, Go, C or some custom one (as long as - like FP - i can create standalone programs). Of course it doesn't hurt that the language is pretty decent. Often people choose an IDE based on the language they want to use, but i think in this case is the reverse: Lazarus is a reason to use Free Pascal, not the other way around :-P.
- spapas82 9y agoBecause lazarus (and its commercial alternative Delphi) are excellent tools and probably the best way to actually develop GUI applications right now (see the related discussion here https://news.ycombinator.com/item?id=12350834 https://news.ycombinator.com/item?id=12350834 and especiall the great comment from TimJYoung). There was a reason that Visual Basic was so popular -- and that was not because BASIC was a great language. Instead it had a great GUI editor and you could very quickly create your apps by dragging and dropping the components and adding code for the actions! For me, Lazarus is the VB of today.
- open-source-ux 9y agoLazarus + FreePascal is an excellent choice if you want to create desktop GUI apps that are: - fast to run (and compile) - native and cross-platform from a single code base - memory-efficient to run (depends on your code of course) - easy to distribute via a single self-contained exe file with no dependencies You might think lots of popular languages today can do all the above, but surprisingly there are fewer than you think. For example, using a dynamic language to create desktop apps will often require gluing together lots of separate libraries and packaging them into a single bundle using another third-party tool. And that's even before you get to speed of execution and responsiveness (yes, performance does matter). Like other posters have said, Pascal doesn't give you features you won't find in other languages, although if you're coming from a dynamic language, Pascal might make you think a little differently about how you solve problems due to its strong and strict typing features.
- piaste 9y agoHow is FreePascal's interop story? It would be super interesting if you could use Lazarus to build the GUI around a library written in a language with a larger ecosystem and/or with more powerful safety features.
- poizan42 9y agoYou can link to anything with a C ABI just by declaring the functions external[0], there's also tools for automating conversion from C header file declarations[1]. [0]: https://www.freepascal.org/docs-html/prog/progsu147.html https://www.freepascal.org/docs-html/prog/progsu147.html [1]: http://wiki.freepascal.org/Creating_bindings_for_C_libraries http://wiki.freepascal.org/Creating_bindings_for_C_libraries
- winkeltripel 9y agoIf you're writing commercial windows app installers, the default way to do so is with Inno Setup, in Pascal.
- squarefoot 9y agoIt's not much about choosing Pascal as a language but rather Lazarus as a RAD system. Pascal is still a powerful and easy to learn language, but the strong point here is the Delphi/Lazarus approach to rapid development. I wish other languages too could be integrated with it.