Home > programming languages > Why "mainstream language" is so opposed to "built on a small core of orthogonal features"?

Why "mainstream language" is so opposed to "built on a small core of orthogonal features"?

November 17Hits:0
Advertisement

On "hammerprinciple.com" website there are programming languages, statements about them and voting that associates languages with statements.

In particular, there are statements:

Why they are so opposed to each other? Is being incoherent, history-encumbrant, ridden with extra special cases a must for being popular, "mainstream" programming language?

Maybe is it similar reason as why beautiful and coherent artificial natural languages (like Esperanto) are not that popular?

Answers

Why designed natural languages are not common

There are three reasons why you learn a natural language:

  1. Your parents or environment speak a language, and you naturally try to understand what they are talking about.
  2. Your school requires you to learn a couple of foreign languages.
  3. ohmygosh {Esperanto,Quenya,Klingon,Lojban} is awesome because I am {interested in linguistics,a {LoTR,Star Trek} fan}.

As it happens, the languages you'd learn under point 3 are ususually not spoken in public or at home, and are not taught in school in place of French or Spanish. Therefore, they are all very niche.

Correlation does not imply causation

Oh wow, so A and B seem to have some correlation. Does A cause B? Or the other way round? Or are there other factors that I didn't consider?

Your question seems to ask if a programming language can only become mainstream if it is not orthogonal. This is misleading.

Languages evolve

Languages change over time. Their standard library gets reworked. New syntax is added. Object orientation is made available. Lambda expressions start looking useful. But closures and objects can be implemented in terms of each other, so why would I need both? Why would I want generics or other type system additions? I clearly do not need them…

A language that does not evolve is probably dead.

Some languages are made to get the the job done

For some languages, practicality is of utmost importance. It doesn't matter if there are five or more screwdrivers in my toolbox, because not all screws are equal. An experienced user will pick the right one for the situation.

Other languages strive to be more minimal and/or elegant. This can be useful for didactic purposes, or in research settings. Small languages are easier to port. They are often useful, but not always when you have to ship your application yesterday.

Market Share is Ballast and Obligation to Move On

A language that tries to be relevant tomorrow has to keep evolving, and include new concepts. For example, the C++ standard is slowly but constantly being reworked. Each release of Java is a step forward. C# is often ahead of the pack as far as mainstream languages go. A language like SML or Smalltalk has no serious ambitions to go mainstream.

A language that already is widely used has to stay backwards compatible, or it will loose market share. Features that were there yesterday have to stay available even if a better alternative was introduced. In Java, type parameters are erased during compilation for back-compat. In PHP, the main namespace is riddled with dangerous and deprecated functions that can't be removed without breaking a good part of the internet.

Conclusion

I would suggest that successful languages tend to become less orthogonal over time, not only that less orthogonal languages tend to become mainstream more easily. However, there is no clear causation because there are more factors to consider.

If I look through the list of languages you linked to we see as orthogonal languages: Scheme and Lua had minimalism as a design goal, academic languages like Coq, Haskell, SML are less useful for day-to-day programming or difficult to learn, and some languages like Forth and APL are barely used any longer.

The less orthogonal languages are all quite mainstream, or have a long history. Fortran and COBOL are ancient, but still have a strong niche. Languages like PHP and Shell grew beyond what they where intended to do. Some languages are explicitly pluralistic, e.g. Perl and its descendant Ruby. The C# language is in direct competition to Java and tries to score with better features. Some languages have a religious commitment to backcompat, e.g. C++ or Perl.

"Small, orthogonal features" is brilliant in a teaching language. It is something I want, in a language I write production code in.

But, I also value "there are good standard libraries" and "I can get stuff done quickly", where there is a strong correlation between a "lack of good standard libraries" and "small orthogonal language". There is a weak correlation between "get stuff done quickly" and "small orthogonal", but a massive anti-correlation between "get stuff done" and "lack of libraries".

Some small, orthogonal languages also take their "purity" (for want of a better word) one or two steps too far, so while purer and cleaner, untainted by practical considerations, they actually end up being harder to write code in.

When I say "production code" and "code", I mean code bases of 100k lines and more.

Related Articles

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.503 s.