Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by seattlejohn (Deacon)
on Mar 25, 2002 at 09:29 UTC ( [id://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.

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.

    U28geW91IGNhbiBhbGwgcm90MTMgY
    W5kIHBhY2soKS4gQnV0IGRvIHlvdS
    ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
    geW91IHNlZSBpdD8gIC0tIEp1ZXJk
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://154053]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2024-03-28 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found