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

> It would be really annoying if we always had to add quotes for string args when we're typing at the terminal

With bash (and I suspect with every other popular shells out there), it actually means something different. In your second example, if you don't use quotes, the shell will do the extensions, but if you do, the process will have to do it (and in the case of ls, it cannot).

In some case it's good to have the shell taking care of it, but sometimes (eg, when using 'find') it's not.



My examples are a made-up idea of what a “real” programming language would look like in a shell, not actual bash.


Sorry, clearly my comment wasn't very helpful.

I was trying to point out that quoting parameters or not could bring a different meaning for a shell (as one could see it with Bash), with the implied consequence that one would have to carry over that nuance somehow to a shell where all parameters would have to be quoted.




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

Search: