Thanks 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?..
I 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.
Thanks, 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.