Generic directives/plugins syntax

This thread is getting out of control :smile: How about being a little pragmatic here. Let’s put the special structured syntax aside for a moment.

What do all languages have in common? Methods/Functions, possibly types, classes, objects, right? As extension is something that mostly programmers will work with, how about having the extension syntax be a method invocation signature? Having either a type or an instance in a parsing context, we could do :

@instance.doSomething(arg1, arg2, arg3)

or

@Singleton.doSomething(arg1, arg2, arg3)

Then you’d just have a plugin(s) with a several methods… The advantage is that it’s pretty much self-explanatory. Name of the type/instance and method would explain what is going on and who is responsible for what. For instance :

@[content-type_xml](code/ScalaResults.scala)

I mean even this needs an entire paragraph to explain what is actually going on.

I don’t like the idea of generic attributes much {…}. But that’s probably because I just haven’t had a need for that.