<div dir="ltr">On Sun, Dec 20, 2015 at 12:33 PM, Andrey Tarantsov <span dir="ltr"><<a href="mailto:andrey@tarantsov.com" target="_blank">andrey@tarantsov.com</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Your whole point is that indentation sometimes gets lost on copy/paste, and braces don't. But it's a strange argument. Why would you use an editor or email program that routinely loses your data (indentation in this case)? Why would you copy your code from a strange web page whose author didn't even bother to format it correctly?<br>
<br>
It sounds like you're not using per-line copy/paste features in your editor, and you need to change your editor or editing habits.<br>
<br>
But I take the resulting broader point: indentation-based editing skills are a bit harder to master.</blockquote><div><br></div><div>Yeah, good point. But since I'm writing Swift code, I'm going to use Xcode. And with apologies to users of other editors, I suspect 99% of swift code will be written in Xcode, so it's probably worth considering how Xcode will deal with copy-paste.</div><div><br></div><div>But for Python, I could use a different editor.</div><div><br></div><div>As for why I would accept such poorly-formatted code, the exact scenario I'm thinking of happened a few years ago. A colleague went on vacation and realized one of the functions he had written had a bad bug in it. He couldn't get into the corporate network over VPN from his remote location, so he emailed me what the function should actually be and then disconnected himself from the Internet for a week. The problem was whatever email system he used to send the code mangled the indentation. It was quite an impressive feat.</div><div><br></div><div>I suspect the more common use case is people copying and pasting poorly-formatted code off Stack Overflow.</div></div></div></div>