7 ms·
Lazarus 1.8 released: cross-platform GUI builder and IDE for Pascal
- geff82 9y agoIt is still an amazing tool if you want to build classic desktop applications or games. Blazingly fast, easy to use. Not fancy in the Visual Studio/Jetbrains way, but it always feels rock solid to work with.
- boznz 9y agoIs becoming my new tool of choice, just keeps getting better and better, keep up the good work chaps..
- zerr 9y agoWhat it would take to add C++ support?
- deleted 9y ago[deleted]
- nurettin 9y agoYou mean LoadLibrary and GetProcAddress?
- maxxxxx 9y agoThat works only with functions. With objects it gets trickier.
- bitwize 9y agoYou mean COM and IUnknown?
- badsectoracula 9y agoIf you are fine with COM and staying with Windows only, Free Pascal has native support for COM interfaces and Lazarus can generate wrapper units for ActiveX controls so that you can use them in a form like anything else. However i think it might be a better idea to just use a plain old C interface (c2pas can help to automate this if you want to create a hybrid C and Free Pascal project).
- nurettin 9y agoI'm guessing HN is too young for CORBA
- maxxxxx 9y agoI remember it but not very fondly....
- nurettin 9y agoI really miss those millenial usenet discussions about whether if you should be trying to send large amounts of data over flaky 56kbps connections (at best) via TCP instead of using CORBA2 because it was slow and required code to adapt existing systems. Delphi already had remote objects, data providers (served via SOAP) and database connections and they actually worked well. In the meantime, microsoft and yahoo invented their own binary chat protocols which worked reliably and scaled to hundreds of thousands of users and everyone was jealous.
- maxxxxx 9y agoThe top comment was about C++ support. With LoadLibrary you can easily interface with C functions but not with C++ classes. That's why a lot of C++ code still exposes a C interface if it's used from another language. COM works too but that adds other problems.
- pjmlp 9y agoCOM has been the future of Windows APIs since Vista, re-inforced with UWP. It is the official way of exposing OO ABIs on Windows, and for WinRT (UWP) it was improved to support generics a la .NET.
- badsectoracula 9y agoA lot of work. First of all, you'd need to somehow make the Free Pascal and whatever C++ you choose to talk to each other, the C++ compiler to be able to instantiate Free Pascal classes (so you can use LCL) and the Free Pascal linker (in the platforms where it is used) to be able to link against C++ objects. Also it would need the C++ compiler to take into account the minute details of Free Pascal's semantics (e.g. in C/C++ it is undefined behavior to dereference a NULL object, but in Free Pascal it is perfectly valid - it'll just do whatever the underlying system does when someone tries to access memory at address 0 - so the C/C++ compiler should not assume that never happens). This is the hardest part, but the second hardest part isn't that easy either: you'd also need to extend CodeTools (the framework that Lazarus uses to parse and maintain an in-memory view of the source code you are editing, the units it uses and their structure and basically keep a somewhat mirrored - but mutable - view of what the compiler would see, plus the extra stuff an IDE needs like the ability to perform queries to find symbols, declarations, etc and manipulations for refactoring) to understand and work with C++ code, so that IDE functionality for updating the code when you modify a form, create an event handler, syntax and word completion, code completion (e.g. declaring a property and automatically creating the backing field and setter method or implementing abstract/virtual methods from a superclass - that in this case might be in Free Pascal instead of C++), etc will work. Note that Embarcadero (who develop Delphi and C++ Builder) did the compiler part of the above using Clang for their C++ Builder, but since Clang doesn't require sharing the changes, that effort was basically lost (only usable by those who are still stuck using Embarcadero products, until the project inevitably dies as C++ Builder was far less popular than Delphi), so anyone who wouldn't like to do something similar with Lazarus would have to start from scratch - an unnecessary waste of time thanks to Clang choosing a permissive license. In practice however i do not think this will happen because it'll need coordination between several teams - and each team to care about the others. For example, Embarcadero who did that with Clang are now stuck with an ancient version of it because of their modification. For it to be done right, it would need the Free Pascal developers to cooperate with the Clang developers to not break each others' code and for the Clang developers to accept the extensions the Free Pascal developers introduce to support the extra functionality that interfacing with Free Pascal needs.
- Roboprog 9y agoI highly doubt anybody seeking out to create and use an Object Pascal development environment wants anything to do with C++. Perhaps you meant to say "Eiffel"? :-) YMMV.
- badsectoracula 9y agoIt would be useful to create tools for existing codebases. For example ~10 years ago when i worked at a game company, we were considering C++ Builder to create the tools for the engine because we could use the engine libraries directly (the engine was really a collection of many small libraries). However that idea was abandoned because C++ Builder at the time had very bad support for C++ (a few years ago they switched to Clang and modified it to use their C++ extensions, but that was too little too late - and AFAIK it wasn't 100% compatible with the previous compiler).
- pjmlp 9y agoActually many C++ devs are ex-Turbo Pascal, Delphi and C++ Builder users. It just felt natural to use both languages. C++ was the welcoming home that we never taken C for, thanks to offering language features that we could use to for safer applications, and more developer friendly abstractions.
- pjbrunet 9y agoFrom the documentation, looks like TP 5 from my high school days :-)
- dragonwriter 9y agoModern Object Pascal is a linear descendant of Turbo Pascal, so the resemblance isn't coincidental. OTOH, it's not the same, much as modern C isn't the same as K&R C.
- souenzzo 9y agoNo export to HTML5 support?
- badsectoracula 9y agoNo, but if you separate the logic from the presentation you can use the LazWeb (or FclWeb, i don't remember) components to create a web-based frontend for the application. There is also a separate framework called Brooks that is supposedly more comprehensive, but i haven't tried that (and TBH i have only touched LazWeb/FclWeb only a little).
- barrystaes 9y agoYou might find https://smartmobilestudio.com/ https://smartmobilestudio.com/ interesting to quickly develop webapplications using what you learned in Pascal/Delphi. It compiles Pascal to Javascript and supports HTML5 canvas etc. edit: words
- wiz21c 9y agoWhy 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.
- beagle3 9y agoFreePascal is awesome, Lazarus is too. If you like FreePascal and are not yet familiar with http://nim-lang.org http://nim-lang.org , check it out - it is inspired by Pascal and Python, compiles quickly to standalone binaries (like free pascal) or JavaScript, or C, or C++ or Objective C. But it doesn't have anything resembling Lazarus .... I wish it did.
- girvo 9y agoIt’s not the same, and it’s not there yet, but perhaps eventually something could be built from nimx or similar. https://github.com/yglukhov/nimx https://github.com/yglukhov/nimx
- JasonFruit 9y agoI have written a lot of FreePascal in Emacs, because for the things I want to do in Pascal, Lazarus isn't much help. Lately, I've been revisiting Nim, and the experience is similar in a very good way.
- vram22 9y agoYes, Lazarus is good. Here is a screenshot of a digital clock app that I created using Lazarus and FreePascal, on Windows. I use it on a daily basis on my PC. Just need to Alt-Tab to it or click on its icon in my taskbar,, to check the current time, on my laptop. Bigger font than the time in the system tray, so easier to read at a glance. https://imagebin.ca/v/3kMOLN2Ru4gc https://imagebin.ca/v/3kMOLN2Ru4gc