Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: (Ovid) Re(2): Linear programming is bad

by seattlejohn (Deacon)
on Mar 25, 2002 at 09:29 UTC ( #154053=note: print w/replies, xml ) Need Help??

in reply to (Ovid) Re(2): Linear programming is bad
in thread Linear programming is bad

Can't resist:
  • Concrete Programming. Because it lacks abstraction.
  • Ballistic Programming. You launch the interpreter on its way and it sails along a simple trajectory to the end (where there might be a big kaboom).
  • Linguini Code. Like spaghetti code, only not quite as messy.

Now you all know why I don't do stand-up comedy for a living.

  • Comment on Re: (Ovid) Re(2): Linear programming is bad

Replies are listed 'Best First'.
Re: Re: (Ovid) Re(2): Linear programming is bad
by Juerd (Abbot) on Mar 25, 2002 at 10:05 UTC

    * Concrete Programming. Because it lacks abstraction.
    * Ballistic Programming.

    Or just Imperative Programming. Imperative means commanding/expressive: you tell the interpreter what to do directly, without abstracting it into subs and telling indirectly. Imperative programming is programming where the program logic and the way it's handled are combined in the same code.

    Most other code forms are aimed at abstracting those two things: have a part that just controls, and have a part with routines to be controlled.
    The easiest is to rip it apart to subs and have procedural or functional programming. A greater abstraction is object oriented programming. The worst abstraction i've seen so far is flow-based programming: complete abstraction of control, data and what actually happens. I think too much abstraction is not good, because I think code should tell you what it does, without comments.

    Imperative programming (what Ovid called "Linear programming") is NOT bad, imnsho. It can be bad. In the example Ovid gave, I think imperative programming is the way to go, and very maintainable. I don't see how the other example, with the parts wrapped in subs, is easier to maintain: someone will only have to read more to find out what happens. For simple scripts like this, imperative programming is my favourite style.

    BTW, _all_ scripts have imperative parts, because otherwise you wouldn't be telling the interpreter everything ;) The term "imperative programming" is related to your main (controlling) code.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://154053]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-04-22 15:17 GMT
Find Nodes?
    Voting Booth?