News for hackers. Stuff that matters.
Re:Four days of Go by lmm on Wednesday April 22, 2015 @12:03PM (#9421382)
I agree with a lot of these (and would be interested in adopting a language that followed them - but one with a decent type system), but I don't think that's the Go innovation. Python had opinions about whitespace and never attracted the same level of hate.
Re:Four days of Go by jkyle on Wednesday April 22, 2015 @03:37PM (#9422996)
Python's long in the tooth right now, but the first few years the whitespace thing was the source of much cursing and gnashing of teeth.

edit

More to your point, though. I would never choose a language for a project because it is strongly opinionated on such things. However, when choices lead to an opinionated language I find the feature a positive rather than negative edition....even if I find a particular decision annoying at first.

Re:Four days of Go by lobster_johnson on Wednesday April 22, 2015 @12:17PM (#9421465)
Python's whitespace has arguably produced metric tons of heated discussion on the net since Python's inception. Back in the day it was often the main thing outsiders (jwz comes to mind) rejected.
Re:Four days of Go by JulianMorrison on Wednesday April 22, 2015 @08:14PM (#9424340)
That and also, that Python has a very Go-like attitude of "do it our way, no, your way has been disabled, our way is the only way."

Arguably, that also explains its success.

Re:Four days of Go by barosl on Wednesday April 22, 2015 @02:24PM (#9422452)
I think Python's mandatory whitespace has a similar nature as Go's unused-as-an-error. They are definitely great in production code, but when I play with code, sometimes I do want to mess them up while adding and removing the parts of the code. Even though I've used Python for more than 10 years, I often feel like "I don't want to indent these lines for now. I wish there were a way to wrap them up without changing the indentation" after copying and pasting some lines.
Re:Four days of Go by markrages on Wednesday April 22, 2015 @08:54PM (#9424449)
Your editor can indent / dedent whole regions of code with just a few keystrokes. If this is not true, find another editor.
Re:Four days of Go by barosl on Wednesday April 22, 2015 @09:14PM (#9424495)
But then again, unfortunately, Python's significant whitespace makes automatic indentation hard, because there are some edge cases that an editor cannot extract the actual intention by the programmer well. For example, if there is a code as:

  for i in range(10):
      if i % 2 == 0:
          print('hello')
and I paste `print('world')` after that, there are at least three possibilities of the proper indentation of the line. It can match with `print('hello')`, or with `if`, or even with `for`.

That's because Python encodes block information solely using whitespace. So, if the indentation changes, the actual meaning of the code also changes! In fact, that's why it is called "significant". You cannot automate it, just like you cannot automate writing code.

Re:Four days of Go by markrages on Wednesday April 22, 2015 @09:55PM (#9424603)
in my editor, I press "tab" anywhere on the line with print('world') and it cycles between the three options.

If I want to move a whole block in one level, I select the block, then press control-C and '>'.

That's what I mean.

Re:Four days of Go by barosl on Wednesday April 22, 2015 @10:02PM (#9424624)
Uh, yeah, same for me, but that's the "I don't want to indent these lines for now" situation that I mentioned above... Wasn't I clear about that?

To me, regardless of the number of the key strokes needed, it's still a manual indentation that bothers me more or less while coding.