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

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

by Anonymous Monk
on Mar 13, 2014 at 09:20 UTC ( #1078142=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re^4: How to understand chapter 6 of Higher Order Perl?
Re^5: How to understand chapter 6 of Higher Order Perl?
by Anonymous Monk on Mar 13, 2014 at 09:39 UTC

    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 :)

Re^5: How to understand chapter 6 of Higher Order Perl?
by DrHyde (Prior) on Mar 13, 2014 at 11:18 UTC

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

      I could not agree more. I could have written almost exactly the same sentences, this is exactly what I think. I would just add one more thing: even though I have been using functional languages at college in the past (and found them interesting but not very useful in real life programming - I was probably wrong on this last point, but that's how I perceived it at the time), I had never really seen how these concepts could be utilized in a very useful manner in a predominantly imperative language such as Perl, until I read HOP. This book has not only changed my way of programming in Perl, but also even the way I think about programming in other languages (Perl is by far my favorite language and the one I am using the most, but I have to use regularly more than half a dozen other languages, such as shell, C, C++, awk, Java, PL/SQL, VMS DCL (the equivalent of shell under the VMS OS) and two or three database-specific proprietary languages). HOP is definitely the best book (well, or at least one of the best two books) about programming that I have read in the last 10 years. OK, some examples in HOP might be contrived, but I think it is just because the author, MJD, is just trying to make the spectrum of possibilities as large as possible. It is up to you to use what you like and discard what you don't like.

        OK, some examples in HOP might be contrived, but I think it is just because the author, MJD, is just trying to make the spectrum of possibilities as large as possible. It is up to you to use what you like and discard what you don't like.

        There is (at least) one problem with that perspective:

        Were the HOP examples written in any language that supported either: compile-time in-lining: or runtime JIT: then the abstractions that HOP uses would be trivially inconsequential to the real-world effectiveness of the solutions it proposes.

        They aren't; ergo: it isn't.

        No one with any real experience of using Perl to solve real-world, real-time, (ie. just 'real') problems; would propose/advocate using such tortuously incestuous, blatantly suboptimal, O'Woe solutions to such trivial problems as exampled in HOP.

        As impressive as HOP appears to so many; there is no example in it that cannot be better -- more clearly; more maintainable; more efficiently -- coded in (real) Perl; rather than in its peculiar brand of Haskell-pretending-to-be-Lisp, trans-coded to Perl.

        If you attempt to speak Dutch; or Russian; or Mandarin Chinese; whilst thinking and phrasing in English; the result is a grossly verbose, and ultimately, unintelligible mess.

        Ditto, attempting to write Lispish Haskell using Perlish syntax.


        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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (16)
As of 2014-08-22 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (163 votes), past polls