-
Notifications
You must be signed in to change notification settings - Fork 4
Home
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:
-
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).
-
extension methods: define new infix-methods on existing types (pimp-my-library with less boilerplate)
-
transparent proxies: re-route all method calls on these proxy objects to a forwarder method
- Virtualized Scala Reference: In-depth description of each feature
- Source Location and Source Context: Linking DSL expressions back to the original source
- Tutorial: Generating JavaScript from embedded Scala code
- Tutorial: Generating SQL
- Tutorial: Compiling embedded Scala code at runtime
Nightly builds are produced by a Jenkins instance. These correspond to mainline Scala trunk.
TODO: link to download
TODO: scala-tools, maven and sbt
Builds that match Scala release versions will be made available starting with Scala 2.10.
TODO: link and instructions
Scala-Virtualized is actively used in a couple of open source projects:
- OptiML: A DSL for machine learning developed at Stanford PPL
- Scala Integrated Query (SIQ): LINQ-style database interface in Scala
- Delite: Framework/Runtime for heterogeneous parallelism
- LMS-Core: Compiler framework for embedded DSLs
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? Let us know!