LWN.net Logo

It's a mistake to ignore the customer

It's a mistake to ignore the customer

Posted Dec 7, 2012 10:12 UTC (Fri) by etienne (subscriber, #25256)
In reply to: It's a mistake to ignore the customer by vonbrand
Parent article: GNU Guile 2.0.7 released

> Come on, parsing infix (precedence and all) is ridiculously easy.

It is not the parsing which is a problem, it is the description of functions.
In pre/post-fix notation, each operator is a function, so you have those functions - thinking in C:
number + ( number, number, ...);
number * ( number, number, ...);
boolean = ( number, number, ...);
boolean < ( number, number, ...);
boolean && ( boolean, boolean, ...);
There is nothing special at all about these functions, compared to any other functions like
boolean print ( ... );

I do not see how you can define a single and simple function type when you use infix, so that in a complex class tree you can derive a class and replace a random function with a simple "addition" or "greater_than". Maybe define a priority for each and every functions? Can this priority change at run-time? at instantiation time?

Note that I am using infix for my programming, so I deal with it...
Note also that I do not want to teach infix to someone writing from right to left, nor do I want to translate mathematics text into these kind of languages...


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds