Template Metaprogramming Made Easy (Huh?)

dsimcha dsimcha at yahoo.com
Thu Sep 10 17:19:36 PDT 2009


== Quote from Nick Sabalausky (a at a.a)'s article
> And before I get the inevitable "D00d thats soo old U shud by a new 1!",
> yes, I *could* go buy a new system. But why should I? I don't do a single
> thing that can't be done just fine on my single-cores. And the only things
> that run poorly are the things are written by teenage lazy hack "I don't
> care about intelligent coding, because everyone should be just like me and
> want to sink all their money into new hardware just because they can!"

Not sure I buy this.  Let's analyze it in simple microeconomics.  Both programmer
time and computer hardware are scarce, expensive commodities.  To some extent, one
can be substituted for the other.  (A programmer can either spend less time
writing crappier code that needs more hardware or vice-versa.)  All else being
equal, you want the cheapest software you can get.

For the sake of this argument, I'm going to assume that the software is paid for
directly by the consumer, though the argument could be extended to cases where it
is paid for indirectly (business websites, etc.) and free software.  A company can
either deliver really unoptimized software for little programmer time, and thus
cheaply, or really fast software expensively.  As a consumer, you only care about
*total* cost.  Therefore, as the cost of better hardware goes down, the only
rational thing to do is spend less time optimizing software.

Of course, this doesn't work for special purpose computers that only run one piece
of software, but let's say the average computer user runs ~20 pieces of software
regularly.  If a new computer costs $400, and each piece of software can be made
on average $20 cheaper by not optimizing it, then you break even.



More information about the Digitalmars-d mailing list