The useless parentheses syndrome
Jan. 3rd, 2007 07:33 amOver the last few decades of programming I've seen a strange thing become more and more common: the useless parentheses syndrome. It seems that most computer languages these days have lots of classes, functions, methods, whatever, that have parentheses that perform absolutely no purpose at all. I'm sure I'm not the only programmer who finds this annoying and confusing. On learning a new language it is one of the most irritating hurdles. Does this one take parameters? Or are the parentheses there purely for decoration?
Related to that, the dot manner of indicating that some function relates to a particular group of functions is a very nice way of doing things, and can do a great job of clarifying code, but I find it often gets mixed up with parentheses in entirely arbitrary ways like this:
length(blah)
blah.length()
blah.length
Looking at the bare reference guides for languages it is often difficult to tell how something is used, or why that way and not another. Even python, the most sane computer language I've yet found, is prey to some of this silliness.
While I'm on the subject I have to say I've never really seen any purpose to the ridiculous proliferation of names for subroutines -- functions, methods, objects, classes, modules, calls, subroutines, blah, blah, blah... As far as I can see, they are all subroutines that take and/or return data.
It seems computer programmers are busy building many towers of Babel. It will be a blessing when AI advances sufficiently that computers program themselves and put us all out of a job. We might get some sanity in programming then.
Related to that, the dot manner of indicating that some function relates to a particular group of functions is a very nice way of doing things, and can do a great job of clarifying code, but I find it often gets mixed up with parentheses in entirely arbitrary ways like this:
length(blah)
blah.length()
blah.length
Looking at the bare reference guides for languages it is often difficult to tell how something is used, or why that way and not another. Even python, the most sane computer language I've yet found, is prey to some of this silliness.
While I'm on the subject I have to say I've never really seen any purpose to the ridiculous proliferation of names for subroutines -- functions, methods, objects, classes, modules, calls, subroutines, blah, blah, blah... As far as I can see, they are all subroutines that take and/or return data.
It seems computer programmers are busy building many towers of Babel. It will be a blessing when AI advances sufficiently that computers program themselves and put us all out of a job. We might get some sanity in programming then.