Just another Perl shrine | |
PerlMonks |
Re^15: World's shortest intro to function programmingby BrowserUk (Patriarch) |
on Jun 20, 2005 at 19:38 UTC ( [id://468467]=note: print w/replies, xml ) | Need Help?? |
I can't even think what chapter it would be in. The implementation is shown on the lecture slides for CH.3. I just assumed (probably wrongly) that it was drawn from the book. I will go find the book next time I'm in town (rare) and give it a good browse. I will say that I have learnt a lot from just the slides already and I thankyou for bringing it to my attention. It's that 2D syntax thing biting you again. You need to indent the "name <- getLine" line in to match up with everything else... Hmmm. Seems I used the tab key instead of the space key for that one line. Looked fine in my editor and I didn't notice the difference in the post till I just looked back. I'm still working on my editor configuration for Haskell. It now converts tabs to spaces on save. The error message could be a little more informative. GetArgs I looked under System.Console; System.IO; System.Info; System.Process; System.Environment didn't get my attention. Before I discovered functional programming, I always thought there must be a better way of creating programs then I was currently doing. Likewise, I really want to like Haskell. My point was not that Perl was perfect or that Haskell was in anyway limited--Autrijus is proving otherwise every day. I'd just really like to see a reasonably simple but complete program developed from start to finish, by a competent Haskell programmer, as a way of getting a step up into the use of the language. With most Algol like languages, it is fairly easy for me to pick up the source to a program who's function I understand and learn by reading and modifying it. I've tried this with Haskell, but it is so different, not just in the layout, but the entire way of structuring the program, that even the simplest of real world examples leaves me wondering where to start. Simple example: When should I use data, when type or newtype? Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
In Section
Meditations
|
|