[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [NOISE] Curly braces [was Re: Curl]
"Christopher Barber" <firstname.lastname@example.org> writes:
> I also would not underestimate the importance of having formulas look the
> same as they do in a book.
I would be very interested in seeing whatever language it is you're
talking about. I haven't seen the quadratic formula look the way it
does in a book in any language yet.
In fact, I would go so far as to say that the prefix-notation quadratic
formula looks more like its book counterpart than infix.
In a book, you notice the big picture first, in this case division.
Prefix notation always puts the big picture first. Infix (as generally
implemented) can make the big picture more difficult to pick out.
I wonder what would happen if you did infix syntax where newlines did
grouping much like parens, and dashes on a line by themselves would
indicate division. Then you could do...
-b + sqrt(b*b - 4*a*c)
...and it would group in the expected way. Now *there's* an infix
notation one could get excited about!
Except, now that I think about it, what if the above expression were one
part of a sum? Getting things to look right to humans and lex/parse
right for the computer would be tricky.
<brlewis@[(if (brl-related? message) ; Bruce R. Lewis
"users.sourceforge.net" ; http://brl.sourceforge.net/