4 ms·
Am I wrong in remembering that python indentation a choice made loosely, "to force noob programmers to write well-organized, legible code"?
by dnautics 5y ago
Am I wrong in remembering that python indentation a choice made loosely, "to force noob programmers to write well-organized, legible code"?
- dkarl 5y agoI think GvR observed that beginning programmers often got confused when the indentation of their code didn't correspond to the syntactic nesting implied by brackets, etc. They found the indentation to be more salient and easier to interpret, so he designed the language to cater to that.
- dnautics 5y agoThanks for confirming. Sorry for the crudeness.
- int_19h 5y agoThe use of indentation for program structure predates Python; it comes from ABC: https://en.wikipedia.org/wiki/ABC_(programming_language) https://en.wikipedia.org/wiki/ABC_(programming_language)
- dnautics 5y agoNobody said python was first. In fact "making the choice" weakly (but not absolutely) implies that someone else did it before
- int_19h 5y agoSorry, I wasn't clear enough: ABC is not just some random language - it's one that GvR worked on before Python, and he specifically said in several interviews that it's where Python originated from. As you correctly surmised, ABC was a teaching language, hence the choice to go with indentation.
- dnautics 5y agoThanks for the clarification, that is fascinating!