Hacker News new | ask | show | jobs
by deepsun 55 days ago
What I found teaching coding us that Python is actually not good as the first language. The main issue is types -- you should always think of what type your variable is (and what types are collection items are). Python makes it hard.

Spaces are sometimes mandatory sometimes not. Something I didn't even think might be confusing, for me it's like breathing.

1 comments

Indentation is mandatory, but when are spaces? Imo, if you're running static analysis it'll take care of types well enough. Sometimes I need a cast but not often.

Contrasting that to helping a college roommate with Arduino code he said he didn't understand what it was doing: he had 0 indentation. Braces everywhere. He didn't understand what it was doing not because it was complex logic (it was only maybe 30 simple lines) but because his flow control was visually incomprehensible. It's pretty hard to do that in Python.

But that's why I believe in polygloty. Best of multiple worlds.