[wg-camlp4] A new branch to experiment with extension points

Alain Frisch alain.frisch at lexifi.com
Tue Mar 5 15:30:54 GMT 2013


On 03/05/2013 02:54 PM, Leo White wrote:
> I meant lighter in an aesthetic sense. It is easier for people to read
> code that uses alphanumeric characters.
> I think the "[@id expr]" syntax is more appropriate within expression
> and type expressions, but for "larger" constructs like structure items a
> keyword based solution would be preferable.

One could argue that attributes "within expressions" should be the light 
ones (with only alphanumeric characters) because they are "in the way", 
while attributes on items on the contrary, can be allowed to be more 
visible because they apply on well-delimited and big pieces of syntax.

Also note that ocamldoc uses "non alphanumeric characters" for its 
"attributes" on small (constructors) and big items.

> However, other than by
> adding a keyword, I have not been able to come up with a suitable syntax
> that wouldn't conflict with some existing structure item.

Talking from experience, there will be a strong resistance to add a new 
keyword (and it is likely that a proposal for a new keyword would use a 
quite common name).  So let's assume this is not an option.


Alain


More information about the wg-camlp4 mailing list