I was about to second "if in doubt, use nfx", but then thought of scheme
varargs.
I feels nice that we can define "operators" using infix syntax:

define {a @ b}
   string-append a "@" b

{"me" @ "domain"}

but then, why not variadic operators:

define {a ! . rest}
  strings-join {a cons rest} "!"

{"bang" ! "paths" ! "are" ! "archaic"}

A trickier question is what if I'm ok with 0 argument - can I spell (define
(! . rest) ..) in an infix way?
The "obvious" extension is:

define {. ! rest}
  ...

but that's really bogusweird.

On Fri, Aug 17, 2012 at 5:10 PM, Alan Manuel Gloria <almkg...@gmail.com>wrote:

> IMO a much simpler treatment is "if the list is improper, use nfx"
> without counting anything.
>
> So in order for the "alternating symbol" rule to trigger:
>
> 1.  The contents should be a proper list
> 2.  The list should have an odd number of elements
> 3.  The even elements (counting the first element as odd) should be
> the same symbol, as compared by eq? and must return true when applied
> to the symbol? predicate
>
> otherwise, (cons 'nfx <>) on the list.
>
> On Fri, Aug 17, 2012 at 9:38 PM, David A. Wheeler <dwhee...@dwheeler.com>
> wrote:
> > I said:
> >> I think that if you have an improper list, the last ("improper") item
> should count as length 1.
> >
> > Hmm, my modified implementation isn't exactly the same as my proposed
> description, and I'm not sure which one is best.
> >
> > The modified implementation translates:
> >   {a + . z}
> > into:
> >   (nfx a + . z)
> >
> > If I was serious about "improper = length 1" then it should be "(+ a .
> z)"instead.
> >
> > This is all an edge case.  The most *important* thing is to avoid
> crashing and to have a concise universal definition.  That said,  I'd like
> even the edge cases to be soundly justified and "obviously right".
>  Thoughts?
> >
> > --- 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
>
>
> ------------------------------------------------------------------------------
> 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
>



-- 
Beni Cherniavsky-Paskin
------------------------------------------------------------------------------
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