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

> Up until the latest Solaris 10 patches, /bin/sh and /sbin/sh did not implement set -e, because on Solaris /bin/sh is the real McCoy - Steven Bourne's shell from 1972 - 1977.

There's been a conformant POSIX shell on Solaris since 1995.

/bin/sh has been conformant to this since 2007 or so.

It is 2019. When should we be allowed to use it?

POSIX is the standard for Unix portability and has been for the last 2 decades. System V never was.

> Portability should never be traded for convenience, because when one does that, one forces "the next guy" to waste his time fixing one's code. That's just wrong. I've had so much of my life wasted by GNU/Linux "bashisms"

"set -e" is not a bashism. The errflag was there from nearly the beginning. By the early 1979 BSD 3 development tree, it could be triggered by 'set -e'. When the POSIX standards committee decided to iron out differences between the BSD and SystemV branches of the Unix Family tree, they decided it was worth keeping, and over the next few years everyone conformed.

> Portability should never be traded for convenience, because when one does that, one forces "the next guy" to waste his time fixing one's code. That's just wrong. I've had so much of my life wasted by GNU/Linux "bashisms" which were completely unnecessary. I resent that deeply. That's my life I could have spent in more productive and fulfilling ways, rather than fixing what should not have been broken to begin with.

There's also things that are good for everyone else's productivity-- by e.g. not catering to someone who is stuck 18-40 years in the past.




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

Search: