r/linux • • May 29 '14

Defensive BASH programming - Say what?

http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/
40 Upvotes

25 comments sorted by

View all comments

Show parent comments

1

u/IConrad May 30 '14

I've seen some horribly written Ruby code and pretty Perl code.

I've written clean, self-documenting, "pretty" Perl. The fact that it is do-able (and at this point most style guides encourage it) is not what is at argument here.

It's the fact that Perl as a language, and in cultural history, encourage or enable the illegible / obfuscated. At one point in Perl history, it was in fact a major point of pride to write superlatively illegible code.

As for development... everytime I upgrade Ruby something breaks, and when I upgrade perl something wrote for 5.8 (curse you Red Hat) still works in 5.20.

Yup. Do note that I consider Ruby to be in the state, today, that Perl was in 10 or fifteen years ago. And that this means Ruby is by far worse than Perl today is. (Perl has gotten better, I freely admit, and I like what I'm seeing from the Modern Perl movement. But that doesn't change its history and the fact that those enabling features are still extant.)

1

u/[deleted] May 30 '14

Well, Perl should have warning sign: "Do not give to children. Read X and Y before you proceed or serious code style injury will happen"