Hacker News new | past | comments | ask | show | jobs | submit login

Some languages (Perl and PHP) will interpolate variables in double-quoted strings. Getting in the habit of typing single-quotes defends against accidentally using variable substitution when you don't mean to.



But some other languages (C/C++) have different meaning assigned to single-quoted strings. Getting in the habit of typing double quotes will ensure you will always get a string.


And Ruby




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

Search: