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

Why is / inherently better as a path delimiter than \ ? DOS was built to be compatible with VMS and other DEC OS's, which used / as a switch character.


If you could arbitrarily pick any character, both are as good as each other. However '\' is currently an escaping character in nearly every program that needs such a function, so as things currently are, '/' is better. This begs the question of when '\' as an escape character became mainstream though.


Because nearly every programming language uses \ as an escape, which means in string literals that you have to double escape the \ which is error prone and ugly.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: