Because Code-Skimming Speed is Soooooo Important

chromatic on 2007-05-31T22:37:57

From Why perl is a bad language:

Computer programmers, in my opinion, read code by pattern matching. That is, with a particular language (and even across languages), they see and recognise patterns which enables them to read and understand the code more quickly.... Equally many programmers will not remember all of the syntax of the language, which means they need to reach for a reference more often.

The author hasn't convinced me that shaving monkeys and sending them to Evelyn Wood courses will help them write maintainable code. (Shave a gorilla and put him in a button-up shirt; he can become a software company CEO.)

I wish, all ponies and unicorns, that just once someone would show me that (let's say Scheme, because it has very little syntax) code with symbol names of davidThomasIsAMonkey and doIt has syntax problems.

I predict the next criticism I find will be as insightful as "Perl is a bad language because you have to use THE SHIFT KEY to make sigils, and that slows down typing speed! THE UNREPENTANT HORROR!!"


From the post...

bart on 2007-05-31T22:58:32

[...] but only be exercising discipline and limiting the syntax you use to a small subset of the available syntax. This requires discipline on the part of the programmer.
Um... why? Why do these people think it's necessary to only use a subset of a language? That's a silly restriction for yourself.

Re:From the post...

perrin on 2007-06-01T04:10:05

Are you serious? No experienced coder would want to use everything in Perl5. There are many things in there that are obviously bad ideas at this point. Restricting yourself to a subset is very much necessary.

Re:From the post...

chromatic on 2007-06-01T05:59:30

I read bart's comment as missing the word "small" in "small subset of Perl".

My personal small subset of Perl leaves out study, reset, dbmopen, dbmclose, and dump, for example. I wish I could excise ref too, but....

Re:From the post...

rafael on 2007-06-01T08:40:16

Ah ? you do use formats ?

Re:From the post...

chromatic on 2007-06-01T15:20:34

I have used them, though it was five years ago. I even figured out a way to make them work lexically in pure Perl.

Re:From the post...

bart on 2007-06-01T10:41:54

A priori restricting yourself is silly.

If perl provides a feature that is just what you need, but you decided long ago you'll never use that feature, you're not doing it right. IMO.

I've never used formats in the past. I'm not saying I'll never use them in the future. It's unlikely, because formats only work well for fixed pitch fonts, but I never say never.

Re:From the post...

perrin on 2007-06-01T13:24:13

There are many features that should be avoided if possible (formats) and some that should be avoided at all costs ($[). Never is a totally reasonable thing to say when choosing your dialect of Perl.