> it makes parsing the language significantly harder<div><br></div><div>Could you be more specific there? I don't see much of a difference. In fact, [ and ] are almost direct stand-ins for tag(' and ').</div>
<div><br></div><div>> makes it significantly less like CSS.</div><div><br>CSS, of course, has neither fields nor variables, so there's not much of a corrolary in this space. The one 'variable' standard that Carto already mocks is the @less style variables, but differentiating between fields and variables is necessary to make comparisons between fields possible, like #rule[ [field] = [otherfield] ].</div>
<div><br><div class="gmail_quote">On Mon, Feb 6, 2012 at 10:41 AM, Thomas Davie <span dir="ltr"><<a href="mailto:tom.davie@gmail.com">tom.davie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">I'm much less keen on this proposal – it makes parsing the language significantly harder, and makes it significantly less like CSS.<div><br></div><div>I'm not completely sure yet, but I also suspect that there's ambiguities between specifying a list of specifiers, and eval syntax which would totally rule this out.</div>
<div><br></div><div><div class="im">Bob<br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>
<span style="font-family:Arial"><pre>if (*ra4 != 0xffc78948) { return false; }</pre></span></div></span>
</div>
<br></div><div><div class="h5"><div><div>On 6 Feb 2012, at 14:35, Paul Hartmann wrote:</div><br><blockquote type="cite"><div>On 02/06/2012 10:27 AM, Richard Fairhurst wrote:<br><blockquote type="cite">Hi all,<br></blockquote>
<blockquote type="cite"><br></blockquote><blockquote type="cite">I'd like to suggest a little 'easement' to make MapCSS syntax less<br></blockquote><blockquote type="cite">verbose in one particular case.<br></blockquote>
<blockquote type="cite"><br></blockquote><blockquote type="cite">Right now, if you want to use a tag value in a declaration, you need to<br></blockquote><blockquote type="cite">fire up the eval parser:<br></blockquote><blockquote type="cite">
    way[highway] { width: eval("tag('lanes')"); }<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It'd be more pleasant, and more efficient, to allow this too:<br></blockquote>
<blockquote type="cite">    way[highway] { width: tag('lanes'); }<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">and it's quite CSS-like, because you can of course use a similar syntax<br>
</blockquote><blockquote type="cite">in Real CSS:<br></blockquote><blockquote type="cite">    way[highway] { color: rgb(0,0,0); }<br></blockquote><br>+1<br><br>I'd go one or two steps further:<br><br>  (1) Get rid of eval:<br>
<br> width: eval("tag('lanes') * 5");<br><br>would become<br><br> width: tag('lanes') * 5;<br><br><br>  (2) Interpret any keyword FOO in an expression as prop("FOO") unless<br>it matches a build-in keyword. (This adds support for global constants.)<br>
<br>way {<br>  RESIDENTIAL_COLOR: #AAAAAA;<br>  LANE_WIDTH: 3;<br>}<br>way[highway=residential] {<br>  color: RESIDENTIAL_COLOR;<br>  width: tag("lanes") * LANE_WIDTH;<br>}<br>way[highway=residential][oneway=yes] {<br>
  width: width - 2;<br>}<br><br>Paul<br><br>_______________________________________________<br>Mapcss mailing list<br><a href="mailto:Mapcss@openstreetmap.org" target="_blank">Mapcss@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/listinfo/mapcss" target="_blank">http://lists.openstreetmap.org/listinfo/mapcss</a><br>
</div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
Mapcss mailing list<br>
<a href="mailto:Mapcss@openstreetmap.org">Mapcss@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/mapcss" target="_blank">http://lists.openstreetmap.org/listinfo/mapcss</a><br>
<br></blockquote></div><br></div>