Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The recent innovation to iOS keyboard is a feature called "Smart Punctuation". When you type the single quote, it will automatically turn into a unicode apostrophe. I am sure many programmers occasionally writing code on iOS are thrilled about this feature.


Any competent code editor app will have already disabled this. https://developer.apple.com/documentation/uikit/uitextinputt...


Thank you for the link!


Settings > General > Keyboard > Smart Punctuation

People do like to exaggerate simple problems.


Obviously, that counts as a spoiler. People also like to figure things out on their own.


I'm sure there are a lot of programmers who don't know this is happening, or if they have noticed, they don't know it's "smart punctuation" so don't know what setting to click.

Computers need a sort of general 'debugger', you should be able to click on something and ask the computer why it did that, or what is this (a bit like web pages have 'inspect') ... so you could click on the unicode quote and ask "What is this? Why is it here? How do I change it?"


> a lot of programmers who don't know this is happening

Not so sure - anyone who’s ever copied and pasted from an arbitrary WordPress blog that adds smart quotes to code snippets, for example, will have encountered this.


This, a thousand fold. I would point out that it's often an inherent problem in many GUIs though. TUIs are (usually) a bit more explicit about what you tell it to do (even if it's still sometimes rather dumb in doing it.

(cue yesterday's article about command line interfaces and reification, https://news.ycombinator.com/item?id=15619796 )


The real problem, of course, is with the programming languages that don’t support proper quotation marks. ;)

In all seriousness—they look better, can be nested without escaping, and provide redundancy that makes for better error messages in the event of a runaway string literal. What’s not to love?


Given how incredibly common this behavior is in other rich text editor interfaces, I am sure many programmers are used to disabling quote replacement.


The fun part is no matter which editor you are in, you get this quote replacement for free!


Ummm... are there many people writing code on ios? Where do they execute it?


There are dozens of them !

There’s a number of good code editing app on the platform (which won’t be affected by this), and otherwise I think it happens to most of us to just open a text editor and type a snippet we send to someone or run in JS or on a terminal.


Gods - I have a bot that I submit commands to, and it breaks up parameters using quotations marks. Or, at least, it used to. Not with 'smart' punctuation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: