News for hackers. Stuff that matters.
Re:Reading Simple Haskell by mlevental on Saturday December 09, 2017 @12:06PM (#15886693)
>omit braces

so you're saying braceless ifs and fors are bad? yes I agree.

> close the wrong brace

-/+ 1 flipping the right number of braces to get that kind of bug is much much harder than indenting a block incorrectly

Re:Reading Simple Haskell by avmich on Saturday December 09, 2017 @02:14PM (#15887470)
But the requirement for always having brackets is just plain inconvenient for many. Even C doesn't always require brackets.
Re:Reading Simple Haskell by coldtea on Saturday December 09, 2017 @03:36PM (#15887963)
>flipping the right number of braces to get that kind of bug is much much harder than indenting a block incorrectly

Maybe, but enclosing an additional statement or more in your brace because you visually indented it incorrectly is just as easy as in Python.

  for (i=0; i<100; i++) {
     do_this_100_times();
     but_this_just_once(); #oops
  }
And if you didn't indent it incorrectly, then it's still possible:

  for (i=0; i<100; i++) {
     do_this_100_times();
  but_this_just_once(); # oops
  }
whereas in Python it's not:

  for i in range(100):
     do_this_100_times()
  but_this_just_once() # correct indentation takes care of it