News for hackers. Stuff that matters.
Re:Type-safely embed DSLs directly into Java by jnellis on Thursday September 17, 2020 @09:22PM (#24511969)
You can write other languages like this in Groovy using Intellij. Intellij allows you to annotate a multiline string as another language, then it will parse and syntax color, autoformat for you. The use case would be when you are templating frontend code snippets on the server side. I'm not sure if its just Groovy though, I'm betting Intellij can probably do this with other languages that have multiline strings.
Re:Type-safely embed DSLs directly into Java by mckinney on Thursday September 17, 2020 @09:28PM (#24511998)
Right, but that is just syntax highlighting. This is resolving the content of the string type-safely, at compile-time.