News for hackers. Stuff that matters.
Re:ASCII and Unicode quotation marks by stephengillie on Wednesday September 13, 2017 @06:23PM (#15243295)
Powershell: "This is a string with an 'embedded quote'."

It's helpful to remember that quotes will interpret the variables inside, while apostrophes will not. Very useful for scripting the creation of scripts. Example:

"It is $time" > It is 15:22

'It is $time' > It is $time

"'$time' is $time" > '$time' is 15:22

Re:ASCII and Unicode quotation marks by dragonwriter on Thursday September 14, 2017 @08:23AM (#15247214)
That's not a string where the same thing used for quoting is used inside the string without escaping, nor is it an example of the distinct begin-vs-end quote pairs approach under discussion.

But, yes, having single and double quoted strings is another way to avoid escaping (which Ruby and a number of other languages discussed as supporting the approach being discussed also support.)

Re:ASCII and Unicode quotation marks by alanh on Wednesday September 13, 2017 @09:35PM (#15244347)
not sure why you were downvoted. Your comment is relevant and the convention can be useful. (PHP worked exactly the same way as your first two examples, although the third would have produced <'15:22' is 15:22>.)