4 ms·
[3, 5, 6, 2] is a list; I have standard tools for iteration over the list and for getting the length of the list. These allow the creation of other tools that b
by DougWebb 15y ago
[3, 5, 6, 2] is a list; I have standard tools for iteration over the list and for getting the length of the list. These allow the creation of other tools that build upon the basic tools: filtering, transformation, reduction, unions, differences, etc. I have this rich toolset for working with lists because lists are a standard datatype; if the syntax for expressing a list were different for every list I wanted to work with, none of these tools could exist.
The 'meaning' of the list, within the context of a specific API, is of course specific to that API. That's the semantic meaning I've been mentioning. My ideal is where you only need to document the semantic meaning, and not the syntax that is used to represent that meaning. The syntax should be standardized.
- icebraining 15y agoBut URLs are always represented as strings, even in XLinks, HTML and such. Adding special syntax wouldn't make it more structured. Every existing toolset for working with URLs accepts them as strings. The other part, identifying a certain string as an URL, is much the same as identifying the 'meaning' of the list - it can and should be done by the higher-level format that sits on top of JSON.