- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
more pattern-matching-translation in bite-sized chunks
Mon, 2010-02-08, 18:44
I've made some progress with the Scala to Java translator. "Simple" pattern
matching expressions are being translated into cascading ifs (no jumps in
sight).
It will take more time and even more refactoring, but the current codegen
techniques will do fine when handling more complex patterns. The translator
is described in Ch. 8 and 9 of the attached PDF, the previous chapters are a
catalog of AST shapes around patterns.
BTW, if you find this project interesting, you may consider tackling one of
the open subproblems [1]
Stay tuned!
Miguel
http://www.sts.tu-harburg.de/people/mi.garcia/
[1] Sec. 2.3 in
http://www.sts.tu-harburg.de/people/mi.garcia/ScalaCompilerCorner/ScalaT...