Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Immutabillity and scope and temporary objects

by Xiong (Hermit)
on Feb 27, 2010 at 20:51 UTC ( [id://825712]=note: print w/replies, xml ) Need Help??


in reply to Immutabillity and scope and temporary objects

-- Blog post; wankerish:

...there is usually not more than one good way to do something...

I see that and start to lose interest in anything that follows. This is a One True rant (in this case, supporting functional programming) and I immediately discount by half anything else the author has got to say.

One True people are slaves to their One True Thing, be it the One True God, the One True Politico-Socioeconomic Model, or the One True Programming Paradigm.

...(with pure being the key word, not functional)...

This raises my absolutism flag. Compared to the average postmodern deconstructuralist, I'm a pretty absolute guy; but I still say the solution has to fit the exercise, not the reverse.

There are no absolute rules in programming; there is no One True Paradigm.

That said, there is much merit in splitting work into scopes. I agree that some data is per-request and should be stored in a temporary object. Assuming you're running a persistent environment like mod_perl, then yes, there will be considerable data that never changes and might as well be stored in an immutable object.

But then, I say there may be plenty of data that changes slowly and yet needs to be stored: per-session data, perhaps. A mutable object is reasonable here. Just don't get sucked into the One True trap.

Replies are listed 'Best First'.
Re^2: Immutabillity and scope and temporary objects
by TGI (Parson) on Mar 02, 2010 at 18:59 UTC

    I agree: Absolutism is always terrible. Relativism is the one true way.

    All kidding aside, it's amazing how many people are still ignorant of Brooks' observations in No Silver Bullet. It seems that there are always many ready to drink the latest Kool-Aid.


    TGI says moo

      Absolutism is always terrible. Relativism is the one true way.
      Hmm - isn't that a self contradicting statement? Or was that on purpose and ironic?
Re^2: Immutabillity and scope and temporary objects
by zby (Vicar) on Mar 05, 2010 at 10:28 UTC
    Let me put that quote in a longer context:
    But TIMTOWDI is a mixed bag, there is usually not more than one good way to do something, and which one it is depends on the context.
    I guess it is the criticism of TIMTOWTDI that caused that knee jerk reaction - but please read that sentence up the the period. This is not an absolute statement - it says that in a given context there is usually one good way to do something - the meaning of context here is not defined so it can be as broad as you can. To characterise the whole article as a 'One True rant' is undeserved given that the author writes:
    One thing to keep in mind is that just because you use immutability to your benefit it doesn't mean you need to use it all the time.
    The more so that I don't see any remark of heated emotions that are the characteristic part of a rant. This is so contrasting with your own style of writing presented above.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-18 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found