in reply to Idioms considered harmful

Idioms are the life blood of a language and without them you completely neuter the language.

Last year I wrote and presented local Student ACM chapter on Generic/Idiomatic Programming. The core issue was of future mantainablity. I wrote it because I needed a way to show others that Generic Programming is bad.

A Generic program is one that is syntactily simple enough that with only very slight changes could run in any language.

The Generic programs were long and cumbersome and as a result obsured the task at hand. They would unravel idioms to equivalent code that would be syntactily "easy" to maintain.

I have seen 3 to 1 differences in line counts between Generic programs and good Idomatic programs. No one will say its easier to maintain programs that are that much longer.

With the right level of idomatic programing the code does its job and lets the real solution show through.

From from my experience Generic programming is favored by those who work in mulitple languages on a regular(even daily) basis and are trying to avoid idioms that do not port well. This is done to avoid coding themselves in to a cornor by anticipating a particular idiom.

Disclaimer