[PREV - SKETCHPAD]    [TOP]

THE_MAKE_STORY


                                             August 22, 2010

   Every programmer knows the story of "make":
   Makefiles have a particularly silly syntax that
   not only uses indentation, it requires an indent      The common programmers
   to be a tab character.                                editors didn't (and
                                                         many still don't)
   The story is that the creators of make realized       provide an easy way of
   early on that that was mistake, but they didn't       distinguishing between
   want to change it, because they "already had ten      a tab and some spaces.
   or so users".                                         You could easily have
                                                         an *invisible* syntax
      The point of this story is to remark at how        error.
      short-sighted these designers were: they
      refused to inflict pain on ten people, and         In general, using
      so inflicted pain on thousands.                    the amount of
                                                         white-space as a
      Moral: don't worry about backwards                 syntatic element
      compatibility, get it right!                       fell into disfavor,
                                                         everywhere except
         However: it could easily be that if             in the world of
         they really took this attitude, if they         Python, which the
         were willing to yank the rug out from           smart people all
         under their ten or so early adopters,           insist is the
         their tiny, fledgling user base would           ultimate language.
         have given up on them.                          They've never been
                                                         wrong before, eh?
         Changing an interface should never be       
         taken lightly.  And unless you're a         
         brilliant genius who always gets            
         everything right (it's amazing how many     
         programmers think they qualify), then       
         you need to design an interface to          
         evolve, to allow you to add new features      THE_PERL_AFFAIR
         without (greatly) impacting existing        
         users.                                      
                                                     
                                                    
            What's a little peculiar about the make
            story is that they probably could've
            switched from tab-only to "tab and/or
            spaces" and gotten away with it: the
            existing Makefiles would all have tabs,
            so all would be okay, right?

            I bet the difficulty was that they didn't
            see how to solve the ambiguity of mapping
            some number of spaces to logical
            indentations.  Me, I probably would've
            added a new special-purpose environment
            variable "MAKE_TAB_WIDTH".  If you've got
            that set to whatever number you like,
            then space indentations are allowed, if
            it isn't set, it's the old tab-only.  You
            could even take it easy on yourself and
            forbid mixtures of tabs and spaces.



--------
[NEXT - ALLEN_WRENCH_SYNDROME]