Making copy/paste bugs too hard discourages copy/pasting code rather than reading and rewriting, so, mixed bag there, IMO.
Making copy/paste bugs too hard discourages copy/pasting code rather than reading and rewriting, so, mixed bag there, IMO.
That was my experience in Python.
-> These statements need to be in this other loop.
-> Cut...paste
-> Reindent
-> Turn my brain to extreme paranoia, and double-check that I properly indented the first and last lines of the code I moved.
In braces-languages, it was just cut..paste..autoformat. If you missed a brace, you hear about it from the compiler.
Python is a great language in a lot of ways, but I caught myself making indentation mistakes twice a week. Significant indentation is, in my opinion, an error in language design.
Personally I've been way more annoyed when I've typed something up in the REPL and can't paste that over directly because of the >>> and ... but that's really a small tooling issue; a smarter editor would remove the REPL marks when pasting. Same for other REPL languages, most of them have PSn...
if other < mine:
update_comments(other, mine)
write_billing(other)
and then I paste it, but get the indentation wrong on the last line, and it falls outside of the if block. Maybe my brainbox needs an upgrade.And yeah, pasting code into a repl would be easier too if I could rely on braces to convey scope.