Alan Manuel Gloria:
> Have some more SUBLIST abuse!!!
> 
> Note that what I'm talking about, mostly, is: should we consider this
> good style or bad style?  If bad, what's a better expression of the
> same logic?

I'm sure "abuse" is in the eye of the beholder.  That said, it's worth 
discussing principles.

> ; please view using a fixed-width font!
> define map1(f as) $ cond

I think this *is* mild abuse stylistically. Not because there's anything 
syntactically wrong, but because I think that major control flow structures 
should be all-on-one-line or begin a new indent.   I think forms like "cond", 
"if", "do", and so on should be begin their own line unless the structure also 
ends on that line, so that *people* can follow major control flow structures.

So if this were a function like "cleanup" instead of "cond" I'd say it might be 
a great idea.

I don't mind:
 if(boil 'hot 'cold)
on one line, because it completes on the line.  Heck, C has "?" for the same 
purpose.

I think it's confusing if the control flow structure begins in the middle of 
the line.

> ! null?(as) $ '()

At first I thought this was abuse, because the "$" is completely unnecessary.

Though I do see that your point is to try to create consistent syntax with the 
other constructs below.  Hmm.  Maybe?

> ! pair?(as) $ cons

I might not do this, but it seems reasonable enough.

> ! !             f $ car as
> ! !             map f $ cdr as

These two seem to me the primary purpose of "$", so not only are they not 
abuse, they're "working as expected".

> ! #t        $ error "attempt to map a non-list"

Personally, I would format this as:
#t        error("attempt to map a non-list")

But it seems reasonable, and I don't think it's *abuse*.

--- 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