Re: OT: Why is C so popular?

From: Steve Lamb (grey_at_dmiyu.org)
Date: 08/29/03

  • Next message: Paul Johnson: "Re: OT: Debian Mailinglist server slow?"
    Date: Thu, 28 Aug 2003 22:44:13 -0700
    To: debian-user@lists.debian.org
    
    
    

    On Thu, 28 Aug 2003 17:29:52 -0500
    Alan Shutko <ats@acm.org> wrote:
    > I've never understood people who are religious about that. It's the
    > same amount of effort whether you do it when you first write the if,
    > or when you add something to it (ie, minimal). The only difference I
    > see is that if you _don't_ later add something to the if, you've
    > wasted that effort.

        It's called maintainability. Who says *you* are going to be the next
    person to touch the code? By sticking to structures that are expandable down
    the road you avoid two things and improve a third.

    1: Avoid unneeded effort to reform the code to do what needs to be done.
    2: Avoid the possibility of a bug.
    3: Make the code far more readable.

       Hey a few years back when I was starting to learn Perl I thought TIMTWOWTDI
    was peachie keen. That's until I had to maintain Perl scripts, more often
    than not my own. This is nice when you first get into the language:
    if foo {bar}
    unless foo {bar}
    bar if foo
    bar unless foo

        Nice that is, until 6 months down the line when you're pawing through code
    trying to figure out what's going on and hit an if followed by an unless and
    one of them contains the reverse of block before condition. Now your brain,
    instead of being able to read and process 1 construct in three different forms
    is dealing with 3 constructs. I've come to appreciate the fact that if it is
    a conditional it is going to be in this format:
    if cond:
        block
    elif cond:
        block
    else:
        block

        And no other. I don't need to worry about my brain trying to wrap itself
    around 4 different forms which are contrary to one another. This is a good
    thing.

    -- 
             Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
           PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
    -------------------------------+---------------------------------------------
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Paul Johnson: "Re: OT: Debian Mailinglist server slow?"

    Relevant Pages

    • Re: Insert with response
      ... FooBar, there's no way and no need to put them in synch. ... column in the foo table to 250 calumns in the bar table. ... set statistics time off ...
      (microsoft.public.sqlserver.programming)
    • Re: Magic function
      ... processing objects created in root at depth 3 ... root obj2 at depth 3 ... processing objects created in foo at depth 2 ... processing objects created in bar at depth 0 ...
      (comp.lang.python)
    • Re: from __future__ import absolute_import ?
      ... foo not in bar ... Unfortunately this is a side effect of using the os's directory structure to represent a python "package" structure. ...
      (comp.lang.python)
    • Re: from __future__ import absolute_import ?
      ... foo not in bar ... A path below the package level is generally a good means to shoot ... to represent a python "package" structure. ...
      (comp.lang.python)
    • Re: how to deserialize variable element/node
      ... string bar; ... In the first deserialization case, bar = "sometimes a simple string is ... Your two XML fragments would have to be represented in an XML schema by ...
      (microsoft.public.dotnet.xml)