Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What makes a language scalable ?

I believe scalability is more about system design. It sounds really odd to me, to say that one language is more scalable than the another.

share|improve this question

migrated from stackoverflow.com Jul 26 '11 at 7:40

This question came from our site for professional and enthusiast programmers.

2  
"Scalable" can have many meanings. "Scalable" in what way? –  deceze Jul 26 '11 at 7:29
    
"It sounds really odd to me, to say that one language is more scalable than the another." Me too. Anyone making this claim needs evidence and facts. Can you provide a quote or a link or a reference. I find t his statement very hard to understand. Please provide a reference. –  S.Lott Jul 26 '11 at 9:51
    
Facebook is in PHP. Thus PHP is scalable. Bing is in ASP.NET, thus ASP.NET is scalable. I guess Google is in Java, thus Java is scalable. I think scalability is platform and language agnostic. –  Saeed Neamati Jul 26 '11 at 12:46
    
@deceze Scalable in the sense of handling very high traffic and massive data. –  r15habh Jul 27 '11 at 20:35

5 Answers 5

up vote 7 down vote accepted

If you want an academic viewpoint, read this paper. If you are thinking about Scala, read Odersky and friends’ overview where they discuss what makes Scala scalable. There’s also a related question on Stack Overflow.

In a nutshell, Scala has features such as operator overloading, user-defined classes, traits, and many others, that allow one to express many domain-specific problems in a very natural way.

share|improve this answer
3  
-1: Academics are the last ones to ask about what constitutes "scalability". They typically write toy programs, and typically do so using a toy language. –  David Hammen Jul 26 '11 at 14:05
1  
That first link isn't really "academic" in any sense other than being hosted on an .edu domain. It does have some pretty good arguments mixed in with the rants and out-dated information, though. –  C. A. McCann Jul 26 '11 at 18:44
    
Related –  r15habh Aug 3 '11 at 7:19

There is no such thing as a scalable language. Every language to date fails in some regard.

  • Does the program support libraries written in that language?
    Pascal exemplifies this problem. not scalable in this sense.

  • Is the language consistent?
    Visual Basic is not scalable in this sense. Visual Basic is an outlier in this sense in that it consistently exhibits an utter lack of consistency. Operating overloading in C++ and other languages is a nice feature, but also a misfeature when the overload is inconsistent with the base meaning (e.g. std::isteam::operator>>).

  • Is the language stable?
    A program written 20 years ago in Fortran or Lisp has a good chance of being compilable and runnable today. Python and scala are not scalable in this sense. Upgrade to the latest and greatest and you may well break code that was written last week.

  • Is the language widely accessible?
    The first computers were programmed at the bit level (ENIAC) or machine level (UNIVAC-1). Six women were capable of programming the ENIAC. Those six women have been recognized by multiple organizations for this incredible feat. A modern day large-scale complex of programs is written by people with varying levels of programming skill. A language that requires an advanced degree in computer science is not scalable. Lisp, for example, is a beautiful language that has pretty much languished in academia because it is not accessible to the masses.

  • Does the language support strings?
    Good luck writing a parser in Fortran.

  • Does the language support numerical processing?
    Good luck writing a scientific program in Cobol. Diehard Fortran programmers reject C (and C++, and Java, and ...) because in their minds nothing comes close to Fortran when it comes to scientific programming. For this reason, a lot of the scientific libraries provided by non-Fortran languages are simply wrappers around Fortran libraries rather than ports of the Fortran implementations to the target language.

  • Is the language applicable to a wide scale of problems?
    The above two questions are specializations of this broader question. The original general-purpose languages, Fortran, Lisp, and Cobol. were anything but general purpose.

  • Does the language perform well?
    Good luck writing a simulation of a galaxy in python or scala. The answer might come back when the universe ends. Performance doesn't matter, until it does matter. When it does matter, performance can be paramount. A language that shuns addressing performance issues is not scalable.

  • Does the language invite bad programming techniques?
    Perl invites programmers to write write-only code. FORTRAN (Fortran much less so) invited programmers to write spaghetti code. Modern languages invite programmers to hide the spaghetti with constructs such as exceptions and breaks, but it's still old-style spaghetti. There's also spaghetti inheritance in C++ and Smalltalk, spaghetti call trees in languages where a ten line function is viewed as being too long. And of course holey lasagna, leaky ravioli, and a host of other kinds of bad pasta code. These misfeatures argue against scalability.

  • Is the language a good language for authoring legacy code?
    Far too many large projects find they need to hire an ex-employee as a consultant because the original author is the only person who has even the slightest chance of understanding the code. A language that is good for authoring legacy systems is not a good choice as a scalable language.

  • Is the language safe?
    Large systems are inevitably written by people who somehow manage to find all of the flaws in the implementation language. Project managers of a large, complex system can choose from two classes of people to author the system: Computer scientists who are clueless of the problem domain or domain experts who are clueless about how to write code well. They can't use people who can live in both worlds because such people are few in number and would destroy the company's pay scale. A scalable language has to be safe with regard to the domain and with regard to computer science constructs. Such a language does not exist.

share|improve this answer
1  
+1 for the many different aspects of scalability, -1 for items not related to it (or universally true of all major programming languages), such as the last 3. I don't think there can be a language, usable to solve real-world problems, in which one can't write bad code, or use potentially unsafe constructs the wrong way. About performance, one should also take into account maturity: compare the performance of Java 7 to Java 1. –  Péter Török Jul 26 '11 at 12:19
    
+1 on general principles and pithiness, especially the last 3. (BTW I wrote a spelling correcter in FORTRAN.) –  Mike Dunlavey Jul 26 '11 at 12:28
    
@Péter Török - I think the main issue is "where it is easier to use unsafe constructs than safe constructs" (liek, say, string-processing in C). –  Vatine Jul 26 '11 at 12:32
    
I'm only passingly familiar with it, but it sounds to me like OCaml doesn't really fail on any of your points, other than perhaps accessibility if that's intended to include "accessible to people who shouldn't be programmers in the first place". –  C. A. McCann Jul 26 '11 at 18:53

Erlang is a good example of a scalable language. It was designed from the ground-up to support massively parallel, (soft) real-time, non-interfering threads with a clean message passing mechanism. The language eco-system was designed for near 100% uptime with in-place upgrades.

What makes a language scalable is whether or not it gets in your way when you want to move from running a single thread on a single node to multiple threads on many nodes. You can do this using any language, but the ease of which this is done differs wildly between languages.

Another example is FORTRAN. Others have knocked good ol' FORTRAN down for not being scalable, but I would argue otherwise. Given its static nature and its rigid programming model, it has been consistently used in high-performance computing situations because of the ease of parallelization. It wouldn't be the language I would pick for network programming, but if I wanted to find the eigenvalues of gargantuan matrices, it would be the go to language (pun intended).

share|improve this answer

Scalability in a language is quite different than scalability in a program. In a program it means it can use more resources according to the needs, but in a program is more about being able to extend it depending on your needs, with new types, constructions, etc...

For example Scala was designed with that in mind, to be easily extensible, and for that it gives you the right tools; if you can time you can read with more detail here

share|improve this answer

A language can be called “scalable” in the sense that it supports clean encapsulation and code modularization, is reasonably easy to read, can support the abstractions you work with and so on. Orthogonality can also help, as when you have just one way to express thoughts in the language, you can better understand other people’s code. In short, language is scalable if it gives you the right tools to comfortably build big systems.

People argue about what language features really help scalability, for example many Perl folks will tell you that orthogonality is not required for a language to be scalable. But the examples I gave should give you the idea nevertheless.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.