Skip to content
TiarkRompf edited this page Oct 7, 2011 · 25 revisions

Scala-Virtualized is an experimental branch of the Scala compiler and standard library that contains a few additions to provide even better support for embedded DSLs (we call that language virtualization).

The key features are as follows:

  1. overloadable control structures (while-loops, if-then-else, pattern matching), variables, object creation, etc. Scala has always translated for-comprehensions into method calls, so that the programmer can change the meaning of a for-comprehension by implementing these methods in a certain way. We generalize this to all control flow operators, as well as to the representation of mutable variables and object creation (for now limited to struct-like datatypes, but providing precise types for field-selection).

  2. extension methods: define new infix-methods on existing types (pimp-my-library with less boilerplate)

  3. transparent proxies: re-route all method calls on these proxy objects to a forwarder method

Material in This Wiki

Eclipse Update Site

NOTE: the build of the Scala Eclipse plugin based on virtualized Scala is experimental (the build, not the code of the plugin itself)! Please use a separate Eclipse installation (and workspace) when installing the virtualized Scala plugin for Eclipse.

That said, simply point a fresh install of Eclipse classic 3.7 to our virtualized-scala update site (built nightly). Please see the official plugin website for more details and up-to-date instructions.

Be sure to enable -Xexperimental in the plugin's advanced compiler settings if your code requires e.g., applyDynamic.

Binaries

The latest distribution (built nightly) of the virtualized Scala compiler and library is available as a zip-file. Archived nightlies are also available.

Additionally, the nightly artifacts are published to scala-tools.org as version 2.10.0-virtualized-SNAPSHOT, so they are readily available as maven dependencies.

To get a feel for the build stability, please have a look at our Jenkins dashboard. The downloads above are only made available if all tests pass, barring currently known issues.

TODO: more on scala-tools, maven and sbt

Known Issues

The continuations plugin is not yet fully integrated.

Development process

Developers push to virtualized-mostrecent, which Jenkins continuously integrates into virtualized-master. Nightlies are built from virtualized-master and published to scala-tools.org as version 2.10.0-virtualized-SNAPSHOT. Every morning, plain vanilla Scala's master is automatically merged into virtualized-mostrecent (which is then built by Jenkins, and if successful, merged into virtualized-master and pushed back to github).

Related Projects

Scala-Virtualized is actively used in a couple of open source projects:

Community

Community support is available on the regular Scala mailing lists. Posts should mention scala-virtualized in the subject line.

Using Scala-Virtualized for your project? Please let us know!