No, I don't "prematurely optimize Python out of everything I write".
The exact opposite, I would like to be able to use Python for more stuff but I can't because it's slow.
Nothing about doing it "prematurely" here. I have tried it for specific problems and it was slow. If anything, having built in in Python first is the reverse of "prematurely". And I have, as many programmers have, a very good general idea of where it's slow and what it can be used adequately for without resorting to C.
And what I argued is that people constrain themselves unconsciously, based on that very knowledge, to the kind of projects they do with pure Python.
Nobody writes a AAA game in Python. Nobody tries to build a browser in Python. Nobody writes a performant Apache/Nginx class web-server in Python. Nobody writes a database engine in Python. Etc etc.
(Note for the "Vulcan"-style literal readers: by "nobody" here I mean "not many" / "not a sane person". I'm sure you can find some experimental, bug ridden, half-developed example of all of those done in Python, with maybe 100 users at most. Oh, and I specifically wrote: "pure python").
> Nobody writes a AAA game in Python. Nobody tries to build a browser in Python. Nobody writes a performant Apache/Nginx class web-server in Python. Nobody writes a database engine in Python. Etc etc.
Almost nobody does any of those things regularly. I've written perhaps two ISAPI modules (in C++), one Apache module (in C) and in none of those cases the code I wrote replaced the bottleneck. It was just that that was the "right" place to put the code. I've done performance analysis countless times (the first time was, indeed, to demonstrate moving off VB3's p-code and into Turbo Pascal's native code was going to have a negligible effect on the performance of a client-server application) and I've seen, over and over again, the bottleneck being the network and the database.
For the exceedingly rare case it's not, I agree, Python/Ruby/Perl/Smalltalk is not the best choice.
> On the contrary, multi language projects are a kludge born out of (pragmatic) necessity.
> Nothing inherently inevitable (or good) about them.
Um, except that coherent planes/tiers of abstraction is the foundation of robust software engineering. You write languages to a spec; compiler authors emit bytecodes for another spec; hardware engineers optimize transistors and lay traces on silicon to meet yet another spec. Etc.
Multi-language is the only thing that makes the world work today. The closest single-language runtime that exists is FORTH and things like that.
Every other "modern" language where you get to pretend your process has a contiguous address space, or that there even exists a thing such as "process", is s pragmatic compromise between compiler and runtime technology.
>Um, except that coherent planes/tiers of abstraction is the foundation of robust software engineering. You write languages to a spec; compiler authors emit bytecodes for another spec; hardware engineers optimize transistors and lay traces on silicon to meet yet another spec. Etc.
Except that we talk about stuff that should be in the same level of abstraction in the first place. It's not about writing a compiler or OS in Python, or using Python for CPU microcode.
It's about writing the numerical routines in a scientific/statistics package in the same language that you write the core business logic, etc.
> Nobody writes a AAA game in Python. Nobody tries to build a browser in Python. Nobody writes a performant Apache/Nginx class web-server in Python. Nobody writes a database engine in Python. Etc etc.
But most developers do none of those things in the first place, regardless of language.