Declarative Object Graph Definition | Builders

80 views
Skip to first unread message

Suminda Dharmasena

unread,
Nov 21, 2016, 10:37:39 AM11/21/16
to dotty-internals
One area Scala can perhaps improve is declarative Object Graph Definition by extending the the syntax a bit. E.g. https://ceylon-lang.org/documentation/1.3/introduction/#declarative_syntax_for_treelike_structures, groovy builder

All major alternatives have it. Scala it is a bit more awkward than other languages JVM languages. Maybe Dotty can improve the syntax where this can be supported.

Erik Bruchez

unread,
Nov 21, 2016, 1:23:21 PM11/21/16
to Suminda Dharmasena, dotty-internals
It seems to me that Scala can already do today what this Ceylon example shows, without any particular new syntax. Or am I missing something?

-Erik

On Mon, Nov 21, 2016 at 7:37 AM, Suminda Dharmasena <sirina...@gmail.com> wrote:
One area Scala can perhaps improve is declarative Object Graph Definition by extending the the syntax a bit. E.g. https://ceylon-lang.org/documentation/1.3/introduction/#declarative_syntax_for_treelike_structures, groovy builder

All major alternatives have it. Scala it is a bit more awkward than other languages JVM languages. Maybe Dotty can improve the syntax where this can be supported.

--
You received this message because you are subscribed to the Google Groups "dotty-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotty-internals+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Suminda Dharmasena

unread,
Nov 21, 2016, 9:46:56 PM11/21/16
to Erik Bruchez, dotty-internals
This can be done in Scala but the syntactic sugar around this is the most limited compared to other languages. ScalaTags vs Groovy MarkupBuilder, Ceylon HTML, Kotlin HTML.

Since XML support is going to be dropped and and the other languages have better markup encoding schemes there is a opportunity to improve the syntactic sugar.
Reply all
Reply to author
Forward
0 new messages