4 ms·
> I think my main superficial turn-off was indeed the non-traditional loops and I was a fan of python whitespace indentation I've always been perplexed that th
by sam0x17 5y ago
> I think my main superficial turn-off was indeed the non-traditional loops and I was a fan of python whitespace indentation
I've always been perplexed that this, a very small thing that barely ever comes up since 99% of the time you are doing a for each loop anyway, is the main turn-off for people learning Ruby, when Python has those crazy weird if statements and indentation-sensitivity
- burnished 5y agoWhat do you mean crazy weird if statements? You can do one liners, or if you don't your indentation is similar to what you'd see in C++. if condition: return expression if condition: foo = value or if condition: body statements elif condition: body statements else: body statements
- wizzwizz4 5y agoIndent by two spaces to get your line breaks to show up.
- sam0x17 5y agoYes, I do this, and this would be great if Python officially recommended spaces, but they recommend tabs, poisoning the well further.
- wizzwizz4 5y ago? • I was talking about Hacker News markup. • Python officially recommends spaces: https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
- sam0x17 5y agoThe colon has always struck me as crazy weird, like we're righting C gotos or something