On 2016-01-27 22:54, moltonel 3x Combo wrote: > On 27/01/2016, Colin Smale <[email protected]> wrote: > >> One way, using a "subscript syntax" with a "data structure" construct >> using a "." as a separator": >> lane[1].destination=Paris >> lane[2].destination[1]=Rome >> lane[2].destination[2]=Milan >> lane[3].destination[1]=Berlin >> lane[3].destination[2]=Munich >> >> Alternatively, using a "suffix syntax", something like you suggest >> lane_1:destination=Paris >> lane_2:destination_1=Rome >> lane_2:destination_2=Milan >> etc. >> >> Thirdly, using the "seamark" construction: >> lane:1:destination:1=Paris >> lane:2:destination:1=Rome >> lane:2:destination:2=Milan >> etc. > > Concerning foo_1 vs foo[1] vs foo:1, I this the last one can be safely > thrown to the idea bin (despite being used by seamarks) because ':' > clashes with namespacing, which is firmly established. foo[1] looks > better than foo_1 to my programer eyes, but is has no technical > advantage (?) and I suspect that most people will find foo_1 more > pleasing, it's also one less character to type, less annoying to parse > with a regexp, and much more established in taginfo.
Would you feel any different about your foo:1 example if it were written foo%1, avoiding any clash with namespacing? By the way, I am trying to maintain the distinction between the "suffix notation" where the index value is actually the final part of the key segment, and the "hierarchical/seamark" notation where the index value is a separate segment of the full key string. Maybe we should look at some technical use cases, like "in a navigation map creator, find all the categories for a POI" or "find the per-lane destination (and destination:ref and turn-lane stuff) information so I can construct a simulated road sign". Some will be done with a programming language, others may naturally tend towards SQL. > Concerning using '.' as a separator instead of ':', I don; t see what > it brings us, beside familiarity to users of some programing languages > (but change language and sudenly ':' becomes more familiar). Sometimes using a familiar character (such as the ":" here) with new semantics can lead to confusion. There comes a point when it is better to make a clean break so there is no confusion. Whether it is a colon or a dot or some other character is "detail" really.
_______________________________________________ Tagging mailing list [email protected] https://lists.openstreetmap.org/listinfo/tagging
