Tags

, , ,

I’m nearing the conclusion that a universal jig is actually undesirable because it leads to monopoly. Imagine that the same jig (i.e. library) could be used forever, then the creator of that jig holds a monopoly. Arguably this isn’t bad if the code is open source and people can do what they want with it. But when it’s something like a spreadsheet application, well we know where that road leads. So change is as inevitable as progress. That’s a great democratizing force except for the groundhog day effect. The road of innovation is a helix that circles upon itself while moving forward (e.g. client-server, functional programming) where we repeat our failures while continually improving.

The Paradigm Helix

The repeating cycle occurs because “this time it’s different” or “the context has changed” or what have you. Many times there are justifiable reasons (computing power has changed, virtualization, etc) that warrant a nod or a shrug, but sometimes you simply cringe. The latest case is the LESS stylesheet language which reintroduces the variable variable.

It is also possible to define variables with a variable name:

@fnord: "I am fnord."; 
@var: 'fnord'; 
content: @@var; [1]

There are some truths that bear repeating and others that should be buried forever and never looked upon again as though you are Indiana Jones averting your gaze when the Ark is finally opened. While cute, variable variables fall into that category of nevermore, and it is shocking that they have found their way into the next level of the helix. Granted there are circumstances where this technique is appropriate, but the same can be said of anthrax and hand guns. An old usenet posting poignantly summarizes my thoughts:

The main point of this article was to present a real example of a case where using a variable as a variable name was a really stupid thing to do. Since most of the people who post about that in comp.lang.perl.misc seem to be trying to do the same stupid thing in the same stupid way, I thought I’d mention it, and maybe raise the general awareness of this problem.

References

[1] LESS – The Dynamic Stylesheet Language

[2] Why it’s stupid to `use a variable as a variable name’