Last updated October 13, 2008 18:22, by Chanwit Kaewkasi
Duby Syntax Discussion
Duby syntax is inspired by Ruby language. Should we make its syntax a bit more closer to Java to make developers easier to migrate their codes? This page is for discussing about its syntax.
import statement
Currently, Duby uses:
import "System", "java.lang.System"
Should it be
import System, java.lang.System
or
import System, java.lang.{System,Subpackage}
The latter one is from Scala's syntax, which looks a bit more convenient to use than Java's.
- I agree the current import syntax needs to change; it was really just a placeholder to get something working. Here's a couple additional ideas - headius
import java.lang.System => System # (2) import System => java.lang.System import java.lang.System # uses whatever's after the last . as a name import java.lang.System.println # so println becomes a global function? (1)
- For (1), is it possible to introduce "import static" for this case? Don't know if it is going to be too like Java - chanwit
- I think (2) is feasible. I feel natural with it - chanwit





