On Fri, Jul 27, 2012 at 4:53 PM, Kartik Agaram <a...@akkartik.com> wrote:

> > {{{+ 1 l} {- 1 l} {* 2 l} {/ 2 l} {= 0 r}}
> >    x = 5 * 3 - 2 + 1
> >    y = x * 3 + 2}
>
> Wouldn't this always be strictly more verbose than just inserting
> parentheses? If the goal is readable notation it doesn't seem much of
> a win.
>
My original idea was that you could define the infix operators at the top
of the scope, for example, at the top-level scope of the source file, and
that the infix operators would take effect for the remainder of the scope.
So you could define the infix operators like this once:

{{+ 1 l} {- 1 l} {* 2 l} {/ 2 l} {= 0 r}}

at the top of the file, then for the rest of the source file, you could use
infix arithmetic for the rest of the source file. Or you could also use the
scoped alternative I wrote previously to use infix operators within a
smaller scope.


>
> It seems to me that we need to engage in these contortions because
> we're trying to communicate with something much stupider than people.
> Perhaps full mathematical notation is AI-complete? Hmm.
>

I agree that curly infix is definitely simpler to understand and implement.
I guess I'm just thinking about the use case of sweet-expressions lisp for
a shell scripting language. I would rather be able to type this:

$ cat file1 file2 file3 > outputfile


than this:

$ {(cat file1 file2 file3) > outputfile}


For the first example to work, you would need to have previously sourced
the infix declaration to the reader at some point:

$ {{> 1 l}}


The extended curly infix notation would be backward-compatible with the
simpler curly infix notation, since it's enclosed in another nested pair of
curly braces.

Anyway, those are my thoughts. I agree that this adds some extra
complexity, but I think it goes along way to making a lisp language usable
as a shell scripting language. But I totally understand wanting to keep
things simple and straightforward.

Thanks!
Ben
------------------------------------------------------------------------------
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