Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So you think we should teach in schools (from an example above):

(/ (+ (- b) (sqrt (- (* b b) (* 4 a c)))) (* 2 a)) ?



Seems like a great idea to me.

I take it you think there is something intrinsically wrong with that idea?


Certainly, I would hope it would have been obvious, but we might each have different opinions of obvious!

I find it very hard, without bracket counting, to see exactly what the '+' and '/' bind to. With the more traditional:

(-b + sqrt(bb-4ac)) / (2a)

I find in only a glance I can tell what everything is binding to.


> I find in only a glance I can tell what everything is binding to.

It must be nice to live in a world with only 4 infix operators and expressions that have only 3 infix operators.

For example, lots of folks think that sqrt should be a prefix operator, not yet another function. I suppose you're going to assume that the top bar will serve as parentheses.

BTW "-b + sqrt(bb-4ac) / 2a" is the interesting expression. Is it "(-b + sqrt(bb-4ac)) / (2a)" or "-b + (sqrt(bb-4ac)) / 2a)" And, are you certain what "bb-4ac" means? (There's at least one major language where it doesn't mean "(bb)-(4ac)".)


We aren't talking about programming languages. We are talking about teaching math in school. In most of school mathematics, there are only 4 infix operators (well, and also the comparison operators).


> We are talking about teaching math in school. In most of school mathematics, there are only 4 infix operators (well, and also the comparison operators).

And that's how the exceptions swallow the rule. And, it's also how we get infix programming languages where that's definitely not true, and so on. Where should we make the switch?

Also, only four? What about set operations?


I would teach it like this:

  (/ (- (sqrt (discriminant a b c)) b)
     (* 2 a))




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

Search: