[clug] Bad features of programming languages.

Paul Wayper paulway at mabula.net
Wed Apr 19 21:43:02 UTC 2023

On Wed, Apr 19, 2023, at 11:18 PM, Brenton Ross via linux wrote:
> Hi,
> I am having an interesting conversation about bad features of
> programming languages. 
> I am wondering if anyone from the group has some thoughts on what they
> hope never to see in a programming language, or just things you really
> dislike.
Hoo boy.  Pull up a seat, everyone will have an opinion on this.  I'm just going to be the first :-)

I think there are two overall anti-features in programming languages.

One is inconsistency.  This is what made PHP such a cursed language in early web development.  Different functions (imported from different contexts) had different calling orders - e.g. some functions that dealt with files put the file handle first, others put it last.  I find with the little work I've had to do with Javascript and Typescript that they have at least three different ways of importing things from modules (that I've seen, there may be more), and they're not always used consistently even across one code base.  This causes a cognitive burden on the programmer - it's harder to read the list of imported things in Javascript than, say, Python or C which have much more consistent ways of importing things.

The other is over-complexity.  C++ and Java keep adding new complicated features at the edge of the language, and nothing is ever deprecated because there's already code out there using that and even one person complaining can keep a misfeature alive.  New programmers come in learning the basics, but then they get shown all this production code that uses template recombinators and list comprehensions and monoid endofunctors and on-the-fly anonymous function construction and it's all crazy.  And the code they're reading is not consistent, because the programmers who programmed it have had their own biases and habits so some things get explicit for loops and others get list comprehensions and it's hard to work out what is right.

Read the essay "PHP is Fractally Bad":


Which shows PHP has both inconsistency and over-complexity.  I see Javascript and Typescript as fundamentally there now and heading gleefully in the "make it more complex and more inconsistent" directions.  C++ and Java are both approaching this IMO.  Perl got a lot of stick for being complex, and tried to reform (see "Perl Best Practices" by Damian Conway) but it was still hard (too many curly braces), and Perl 6 never happened.

The real problem here is that once you add problem features to a language it is hard to take them out.  Someone's production code now relies on inverted tense substantiation or the RandomlyTwiddleBitsInTheOperatingSystem library and you can't take that out even though it's actively harmful, because their code relies on that.  Most languages have no systematic way to reduce complexity and inconsistency, because their relevant standards bodies are focused on adding new shiny things instead of making sure the language overall is consistent and only as complex as it needs to be.

Have fun,


More information about the linux mailing list