Currently, Ur/Web supports an 'id' attribute on any XML element. I added this when someone requested support for the <label> tag.

Currently, 'id' attributes have type [string]. This freaks me out somewhat, since it's anti-modular; different functions written by different people might need to coordinate to avoid duplicating IDs. The use of IDs is convenient for FFI JavaScript code that wants to get handles to DOM nodes.

So, I'm thinking of adding an abstract type of IDs, with only one built-in operation: "generate fresh ID." Every tag's 'id' attribute would change to take a value of this type. Under the hood, these would just be strings, making for easy FFI integration.

Does anyone object to the idea?  Any other feedback?

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to