Andreas Raab wrote:
Having operators is useful too, I would like to have operators too because I prefer to type 2 + 3 * 6 than 2 + (3 * 6) and because this is MATH and MATH are right!
I hope you see my point.
If your point is that we should not have appropriate operator precedences, then I don't see it. I find absolutely nothing wrong with them. There are plenty of language (Prolog, for example) dealing with operator precedence pretty well and at the same time not restricting people to use only built-in operators. So actually I agree - I want operator precedences too! ;-)
I think we should be careful on this slippery slope...as you point out, there is a delicate balance between simplicity and purity. Many languages have been ruined by adding constructs that were meant to make things more convenient but sacrificed consistency. I think this was Stephane's point actually. These constructs usually make a language more convenient for those with a lot of experience in the language, but much more difficult for people new to the language. If you need proof of this, just look at the recent thread titled "Storing and Retrieving Points."
I'm not arguing against using mathematical precedence, just that the idea be carefully considered. Also, there are many mathematical expressions that cannot be rendered in plain text. Why not augment Squeak with the complete language of mathematics instead? Let's allow a mathematical expression to be constructed using a full graphical representation and then be dropped into a method.
- Stephen