This Would Be Just a Library in Scala
Posted under Scala ·Update: First in a series. Episode II is also available.
Scala’s flexible syntax, implicit conversions and powerful support for abstraction are extremely conducive to the implementation—as libraries—of useful software constructs and idioms that would normally need to be “baked in” to other languages.
Many of my cheeky pot shots at Project Coin are illustrative in a small way of this capability.
To illustrate further, I thought I’d start off by listing just a few of the well-liked features of other languages that have been implemented successfully as Just A Library In Scala:
Other Language | Feature | Scala |
---|---|---|
Erlang | Actor concurrency | Scala Actors |
(many) | Map Literals | Map("hi" -> true, "bye" -> false) |
(many) | List Literals | List("hi","there") or "hi" :: "there" :: Nil |
(various) | Automatic Resource Management | manage(stream) { stream.write… } |
Before you write to complain that any of the above has annoying syntax, please remember that It’s Just A Library, and if it bothers you enough, you can write your own.
- Wednesday March 11, 2009
- 2 Comments
- Previous Article
- Next Article
1 · Monis Iqbal · Fri Mar 27, 07:35 am
2 · Alex Cruise · Fri Mar 27, 08:06 am