-- 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.


In reply to Re: Immutabillity and scope and temporary objects by Xiong
in thread Immutabillity and scope and temporary objects by zby

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.