News for hackers. Stuff that matters.
Re:Why People Should Learn Python by yoz-y on Wednesday August 24, 2016 @08:34AM (#12351519)
The web collapses whitespace so if the code is not in <pre> tags you are stuck. This is quite often a case where comment systems were not intended to share code.
Re:Why People Should Learn Python by dTal on Wednesday August 24, 2016 @09:12AM (#12351727)
You're right, of course, this does often happen. Seems to me, though, the issue isn't cutting and pasting something on the web - it's getting it losslessly onto the web in the first place. It's the responsibility of the person posting the snippet to ensure it shows up correctly, and if their chosen platform doesn't support that they should use a better one.

This probably reads pedantically, but I do think there's a distinction. By analogy, if someone tried to post APL on a site that didn't support Unicode, you wouldn't say the issue is it's "hard to cut and paste APL".

Re:Why People Should Learn Python by pjc50 on Wednesday August 24, 2016 @09:15AM (#12351742)
Yes I would. Requiring a character set outside of ASCII is what I'd call a high-risk design decision, that could easily become a misfeature of a language. Windows "smart quotes" are bad enough and that's not even a programming language. This is why people invented J as an alternative to APL.
Re:Why People Should Learn Python by dTal on Wednesday August 24, 2016 @10:48AM (#12352410)
Would you say it's "hard to copy and paste Unicode"?
Re:Why People Should Learn Python by pjc50 on Wednesday August 24, 2016 @11:46AM (#12352858)
Most systems support UTF-8, so most of the problems have been solved by now. There's still a lot of scope for malicious or very surprising unicode; invisible characters or modifiers, font problems, RTL/LTR, characters which have different code points but cannot necessarily be visually distinguished ("ı = 1" etc), good old Zalgo, and so on.
Re:Why People Should Learn Python by ramblenode on Wednesday August 24, 2016 @09:37AM (#12351879)
It's Python's fault for not retrofitting its syntax to satisfy a markup language invented years later?
Re:Why People Should Learn Python by yoz-y on Wednesday August 24, 2016 @10:59AM (#12352501)
No, but it is a problem that people encounter nevertheless.