Getting more complicated

I was reading about C in Wikipedia (under C programming language). The article first presented the ubiquitous "hello, world" program written in K&R C:


main()
{
printf("hello, world\n");
}


and then the same program in ANSI C:


#include <stdio.h>

int main(void)
{
printf("hello, world\n");

return 0;
}


Now I know that ANSI C is an improvement over K&R C. But in this case, the "improvement" has produced a program that needs two additional lines to accomplish the same thing.

Wouldn't it be better if technologists spent time making technologies simpler rather than more complicated? It's true that simpler technologies are always arriving. But unfortunately the tendency for any single technology is to get more complicated rather than less. I think that the only real reason why C hasn't gotten significantly more complicated since ANSI C is that all the extra features got tacked on to C++ instead, making it an insanely complicated language.

Java is undergoing a similar...complificiation. Generics do cut down on source code volume slightly and increase type safety, but they are anything but straightforward. For proof, all you need to do is look at the interfaces for the collection classes, which have suddenly sprouted lots of >, <, and & characters. It's a lot easier to use generics-enabled classes than write them. Meanwhile the new enum type creates a whole new set of rules. And annotations blur the line between code and data. All of these features have uses, but they all also increase the total amount of knowledge required to effectively work on Java applications, and that doesn't bode well for the language over the long run.

Comments

Popular posts from this blog

UUIDs as primary keys

Scala and Kotlin

Generating thumbnail images: AffineTransformOp gotchas