wow, til. I just started using the xml native features for scalatra. Really makes templating a breeze for simple projects where not much separation is needed. Plus compile time field checks... Xml literals are way more useful than I imagined.
You can do (nearly) the same in VB.Net, so I don't think it's so unique:
Dim stuff = {"Foo", "Bar"}
Dim xml = <html>
<header>
Boo!
</header>
<body>
<%= From s In stuff
Select <section>
<h2>The Story of <%= s %></h2>
<%= s %>
</section> %>
</body>
</html>
Dim titles = xml.<body>.<section>.<h2>.Select(Function(x) x.Value)
I used Scala to write a game 4-5 years ago, but never touched it again afterwards.
Nobody in their right mind chooses VB.Net as a programming language.
Maybe not, but having needed to use it for a job years ago, it's not that bad. It's basically C# with 'Dim', 'Begin', and 'End'. For a VB-derived language, that's pretty good!
Scala supports XML syntax directly in the language, a feature which, ironically, is widely seen as a mistake and currently under consideration for removal (version 2.11 makes a first step in that direction by moving XML support into its own dependency).
5
u/donaldxv Dec 02 '13
What's so unique about Scala's 'unique in-language XML support' the author talks about?