Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In this post, Martin (the language's head honcho) writes:

[XML literals] Seemed a great idea at the time, now it sticks out like a sore thumb. I believe with the new string interpolation scheme we will be able to put all of XML processing in the libraries, which should be a big win.

Being interested in language design myself, I'm wondering: Why does he write that it was a mistake to incorporate XML literals into the language? What is the controversy regarding this feature?

share|improve this question
Perhaps he was referring(in the post you linked) to having a simple and consistent core and moving more specialized features to libraries – Zavior Dec 17 '12 at 8:50
up vote 10 down vote accepted

I believe Martin explains the reasoning very well in his post:

I have always tried to make Scala a very powerful but at the same beautifully simple language, by trying to find unifications of formerly disparate concepts.

The problem many languages face when they become more and more popular is that features are wanted by the community and added on top of the language. A worst-case example of this (at least in my book) is C++, where you have pretty much everything, yet not at all in a beautiful unified manner (see for example this question arising from that).

The difficulty, when a language grows due to demands/needs from the community is to add the new features in a way that is consistent with the language's core. And in this respect, the XML literals support of Scala is a sore thumb, because this is a unique thing. It's not really part of a beautiful unified core, but has been added as a once-off solution, whereas the string interpolation is a core concept powerful enough to replace the once-off feature.

share|improve this answer
IMHO, in an ideal world, a language should only contain the core features that allow its developers community to extend it. Extensions should not be part of the core language but should be provided as libraries. So, eventually language revisions may specify new standard libraries but no new language features. Of course, defining such a core language that is powerful enough is not a trivial task, but I think some languages (e.g. Lisp) came pretty close to it. – Giorgio Dec 17 '12 at 10:09

Your Answer


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.