Alpheus Madsen:
> I don't know why, but I've always been bothered by calling s-exprs "ugly"; 
> it's something that has bothered me ever since I've discovered 
> sweet-expressions....
> This isn't to say I don't think that s-expressions are perfect, by any means! 
> ...
> Having said that, I can't yet suggest a better word.  Maybe "awkward"?

"Awkward' is fine by me.  I'll modify the presentation.

> Indeed, I always cringe when I see an inequality, like "(< a 1 b 2 c 3)"--if 
> anything makes the case for sweet-expressions, it's that it will become 
> possible to say "{3 <= a < 10}" in a short-circuitry sort of way...

Well, sort of.  If the comparisons are exactly the SAME on all sides, you can 
indeed easily express them like this:

    {a < 1 < b < 2 < c < 3}
    {3 <= a <= 10}

However, if the comparisons are *different*, such as:

    {3 <= a < 10}

You can do this only if you define "nfx" to make it so.  Otherwise, the system 
has no way of knowing that there's a relationship between <= and <.  In fact, 
there may not be one (or an obvious one).  Although <= and < have a strict 
relationship in most of mathematics, comparisons of floating point numbers are 
actually rather messy, especially when you ask what "=" means.

That said, if you don't want to define nfx, you can still do this when you vary 
the comparison:

    {{3 <= a} and {a < 10}}

Which I think is very clear, and is in fact how you would write this in most 
programming languages.  The "cure" to "fixing" this would be, in my opinion, 
far worse than the disease.

--- David A. Wheeler

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to