On Sat, Jul 14, 2012 at 9:12 AM, Kartik Agaram <a...@akkartik.com> wrote: > Also, has there been discussion of the haskell approach? > > a) Explicitly mark certain ops as infix. That would eliminate a lot of > curlies, and also allow any op to be infix. > > b) Allow any op to be temporarily infix by enclosing it in backticks > or something like that. Maybe curlies? > > matrix1 {convolve} matrix2 >
Yes, it has been discussed, in the "inline default" mode, you use /operator/ to convert temporarily to an infix operator. > --- > > My major concern with curly infix is that it introduces an extra layer > of indirection. Say you're trying to track down a bug in evaluation: > > i) Lisp is extremely direct. All the parens are visible, directly > permitting reasoning about evaluation. > ii) An indentation-sensitive lisp like wart requires mentally > inserting parens to make sure we aren't accidentally wrapping > something we didn't mean to. > iii) Curly infix requires converting indentation to curly infix and > then *removing* the curly infix to convert to prefix. > > I'm sure these issues have been done to death on this list, and > they're probably not on top of your todo lists before the deadline. > Feel free to point me at the mailing list archives :) Refer to this page instead: http://www.dwheeler.com/readable/version02.html In particular, dwheeler tried out various approaches to infix, and soon found that, to his surprise, non-explicit infix is *less* useful. In fact, consider a complicated expression in C: if((cond1 && cond2) || (cond3 && cond4 && cond5)) ... While I know for a fact that && bind tighter than ||, I won't be comfortable writing it out as cond1 && cond2 || cond3 && cond4 && cond5 - I still group them. So the basic insight in comparing infix-default and curly-infix is that as infix expressions get more complicated, you *are* going to group them anyway, so you might as well grit your teeth and group them now while they're still simple. Sincerely, AmkG ------------------------------------------------------------------------------ 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