3 ms·
Not necessarily. Sometimes, the very structure (syntactic I mean) of language makes ceratin kinds of abstractions (behavior abtractions as well) veryhard to im
by ilkhd2 18y ago
Not necessarily.
Sometimes, the very structure (syntactic I mean) of language
makes ceratin kinds of abstractions (behavior abtractions as well) veryhard to implement, which is effectively same as having no way to express them.
I mean, for example - there is no way, absolutely no way to write Lapack benchmark in Ruby to be as fast as C one in reasonable amount of time (you can always emit machine code and run afterwards, but that is cheating). Or less controversial example: Java VM has no tail recursion optimisation, and for example Clojure does not have either. That means you have no way to use certain class of programmin techniques with it,
As a conclusion: languages largely prescribe the way to implement architecture with them.
- ilkhd2 18y agoBy the way for me it is also important that the particular Language has non-gpl translators.That is also can contribute to the choice of the language for particular task, and consequently the final architecture.
- jasonwatkinspdx 18y agoI think we're in agreement without quite realizing it. These are examples of efficiency, not scalability. This distinction isn't quite binary, and Ahmdal's law is a good approximation. But for the discussion at hand we can generally ignore the serially dependent portion of the workload. Also, I'm speaking of systems architecture, not program architecture, so whether tail calls are interpreted or compiled doesn't really apply. To make my point more clear: I'm absolutely certain you could write twitter in pure ruby, even at it's current traffic level. It's also likely this wouldn't make sense, as the economics would be wrong. But the economics would be due to efficiency * hardware costs as compared to programmer staff costs, not any limitation of scalability. I would grant you that there are a few exceptional cases where the language really does constrain the system's architecture (non turing languages and jailed languages with limited connectivity options) but those are never the languages being discussed in "does it scale" debates.
- ilkhd2 18y agoI have to disagree. Let us take an extreme example - Erlang. It has very interesting design, which enables you to create highly scalable but quite ineffecient program. There is something in Erlang, that affects _system_ architectures that you can create with it. The notion of scalabiliy - it is how it scales, how fast the performance degrades with number of users, and for some paradigms there is a necessity of support of them in the language. erlang exists only because people wants scalable solutions even though quite slow. From what I said it seems for me that it is obvious that some _languages_ do scale and some do not.
- berntb 18y agoTwo parts here. 1. Scripting languages might be too slow for Twitter? If they say so, I'll believe them -- the right tool for the job. 2. Too large and sloppily written code base, so there are problems with keeping the APIs between modules clean? That is a risk with loosely typed languages. I don't get why this is a problem. Other people has written large systems with Perl/Python/PHP/Ruby/etc and gotten around that problem. Also, I assume Ruby (like all other scripting languages) has some simple module to assert parameter types -- it's only needed for the externally called methods anyway. Edit: Another thing hit me, regarding what I comment on. The memory usage should be different for long running Scala and Java code. Has this been tested and tuned..?