5 ms·
Last time I've been programming on Pascal was almost 20 years ago, just before I've learned Java. The Delphi was a breakthrough in 90s, but today, when we have
by ivan_gammel 10y ago
Last time I've been programming on Pascal was almost 20 years ago, just before I've learned Java. The Delphi was a breakthrough in 90s, but today, when we have MLoC-size apps, this language is just too outdated, fighting the wars of the past and preserving some unnecessary legacy. Memory management? Dependency management? Reflection and generative programming support? There are some things, of course, that are still nice to have in languages like Java (I liked the class helpers), but, thinking about development productivity and code quality, I'm not sure this can be called anything else but a steampunk toy, as modern as contemporary replica of some Art Nouveau thing.
- vidarh 10y agoThe vast majority of apps today are still small, and certainly nowhere near MLoC-size. It certainly lacks features many of us takes for granted. But people e.g. still write C, that is far more primitive, so if people want to do Object Pascal, why not. Though it's a shame to see it effectively win over a language like Oberon (if one first is to stay in the Pascal lineage).
- mhd 10y agoOr Modula-3, if you're not going the minimalistic route of the Wirthian tradition.
- ivan_gammel 10y agoThanks to lots of available 3rd party frameworks, modern web portal can be just 50-100KLoC, but add all the dependencies and you may become really close to million lines. All these dependencies have to be resolved, loaded and processed in order to compile your code, namespace and version conflicts must be avoided, test dependencies separated from production ones etc, so you cannot ignore it as some magic on the back stage. Of course, there's still some room for low-level utilities or one-time scientific calculations, for which Pascal can be used (hell, I remember that times, when we, the kids, hacked our school network to get super user access by writing keyloggers and simple viruses on TP6), but should it be a language of first choice for that today?..
- leledumbo 10y agoI agree with your first 2 sentences, which Modern Pascal is just as capable, if not more, than Java. Lazarus is an example of such complex project, it has near 5 MLoC (without external dependencies) according to openhub and is managed just fine, thanks to the compiler's smart dependency management. Modern Pascal is a very good language of choice when you have tight budget but still want to compete with enterprise Java systems. The low resource requirement is one prominent factor while the performance is similar if not better in real world applications. We have one of our apps (web application with embedded web server, proxified by nginx) running constant 100MB RAM only at peak, single process, while serving tens of thousands of users, backed only by a single SQLite database. Even the 100MB is mostly due to our template engine automatic caching system. Java will win in microbenchmarks, but that's the best HotSpot JVM can do. Tight loops and complex calculations are actually seldom happened in enterprise apps, while context switching happens a lot more often as (a lot of) users move from one context to another frequently.
- ivan_gammel 10y agoThanks, that's really interesting. I'm not surprised that Pascal applications are very fast - after all, it's native. My main concern is the maturity of ecosystem - tools, libraries, frameworks, everything that defines the TCO (development + distribution + maintenance) of modern application. It's good to know that something exists in this field and there are examples of live apps and it would be interesting to compare the stacks and their capabilities.
- edwinyzh 10y agoHello, is that web app using Brook framework, mORMot or anything else?
- revanx_ 10y agoIf you haven't touched Pascal in 20 years you should refrain from making comments about the language not being fit for development productivity and code quality, it simply isn't true.
- ivan_gammel 10y agoYour assumption that I did not get familiar with the topic before writing my comment is wrong. I've not only read this article, but also spent some time researching what's beyond it - enough to have an opinion and express it. If all you can do is to make such advices, you could refrain from making this comment yourself. If you have something to say about the matter, I'd be happy to learn and discuss in a productive way.
- sigzero 10y agoYet, you didn't refute him. Your last sentence about code quality etc. is just bullocks.
- ivan_gammel 10y agoShould I care about yet another "bullocks" opinion or maybe you have any sensible objections or questions? I'm ready to explain something, but not when the discussion goes this way.
- vanilla-almond 10y agoFree Pascal is a very capable language. I noted some of its features in a separate post. But here's a quick recap - fast compilation - fast program execution - compiled to small (or smallish) native executables (including GUI apps) - cross-platform - low-memory usage executables (does depend on code) - strongly typed Now ask yourself: how many modern or popular languages can match all the features above. Surprisingly, not that many.
- clouddrover 10y ago> Last time I've been programming on Pascal was almost 20 years ago So high time to give it another look. It's changed a lot in 20 years. Check it out: 1. Free Pascal: http://www.freepascal.org/ http://www.freepascal.org/ 2. Delphi: https://www.embarcadero.com/products/delphi https://www.embarcadero.com/products/delphi
- ivan_gammel 10y agoAlready did.
- boznz 10y agoThe article is a very nice intro to object pascal which as far as I am ware does not have problems in the areas you specify.