Hacker News new | past | comments | ask | show | jobs | submit login

> I still can't see anything about the first one that indicates the point that infix notation is a bad idea.

I didn't make a very good argument for it. I really intended that to be more of a throwaway rant than a serious critique. But since you ask...

There are two problems with infix:

1. It's hard to parse. It requires precedence rules which are not apparent in the notation. In actual practice, the precedence rules vary from context to context and this causes real problems. It's an unnecessary cognitive burden that pays very little in the way of dividends (a few less pen strokes or key strokes).

2. It obscures the fact that infix operators are just syntactic sugar for function applications. It leads people to think that there is something fundamentally different about a+b that distinguishes it from sum(a,b) and this in turn leads to a ton of confusion.

> that's clearly not what you meant

Indeed not. I meant the successor operator as defined in the Peano axioms.

> you quoted

Yeah, sorry about that. When I first replied, I thought you were the same person who posted the grandparent comment. My first draft response turned out to be completely inappropriate when I realized you were a different person, but some of my initial mindset apparently leaked into the revised comment. My apologies.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: