Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: How to understand chapter 6 of Higher Order Perl?

by Anonymous Monk
on Mar 13, 2014 at 09:00 UTC ( [id://1078140]=note: print w/replies, xml ) Need Help??


in reply to Re: How to understand chapter 6 of Higher Order Perl?
in thread How to understand chapter 6 of Higher Order Perl?

Nah, I actually understand what it does (which is nothing useful). I just find it very annoying. That's not the real problem, of course. The problem is that I need some kind of tool or something to track all these function calls. So far I'm doing it manually, and that's kind of difficult when there is stuff like
my $hamming; $hamming = node(1, promise { merge(scale($hamming, 2), merge(scale($hamming, 3), scale($hamming, 5), )) } );
I find it kind of unreadable even without promise.

Replies are listed 'Best First'.
Re^3: How to understand chapter 6 of Higher Order Perl?
by BrowserUk (Patriarch) on Mar 13, 2014 at 10:52 UTC
    Nah, I actually understand what it does (which is nothing useful). I just find it very annoying.

    I don't disagree with you.

    That's not the real problem, of course. The problem is that I need some kind of tool or something to track all these function calls. So far I'm doing it manually, and that's kind of difficult when there is stuff like ... I find it kind of unreadable even without promise.

    Again, I don't disagree. I call it obfuscation through over-encapsulation.

    The misguided attempt to gloss over moderately "difficult" perl syntax with myriad small, trivial named subroutines or methods. All it does is obscure the underlying algorithm; complicate maintenance and debugging; and throw performance to the dogs of dogma.

    This is far simpler, clearer and way more efficient.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      This is far simpler, clearer and more efficient
      You're right. And "syntax with myriad small ... subroutines" is not good for me at all. Especially when many of these subroutines tell that they're called __ANON__. I'll do as the fellow Anonimous Monk recommended. Thanks everyone.
Re^3: How to understand chapter 6 of Higher Order Perl?
by Anonymous Monk on Mar 13, 2014 at 09:13 UTC
    time for a week long break?
      I dunno, maybe this functional thing is simply too difficult to learn for what it does? It's not like I'm going to use it in real world. Perl is already write-only, heh.

        It is difficult to learn if you're only used to programming in an imperative style, but it's worth persevering. I sometimes found that some bits only really made sense to me if I skipped over the chapter, saw how it was used in practice, and then came back for the explanation.

        As for not using it - I rarely programme in an entirely functional style, but I learned a huge amount from HOP that I find incredibly useful every day, both in my fun-time programming and at work. There are some problems where it's really useful to be able to construct functions on the fly which are variations on a template, and to throw functions around as data. Sure, you can always find other ways of doing it, but the functional way is easier to read and debug.

        I dunno, maybe this functional thing is simply too difficult to learn for what it does?

        Oh, you were expecting to learn something?

        :D

        It's not like I'm going to use it in real world. Perl is already write-only, heh.

        break is definitely overdue

        I skipped chapter 6 ... I tried simple HOP::Parser usage but couldn't get started ...

        I took a long break :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-26 09:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found