Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: IO::Lambda: call for participation

by xdg (Monsignor)
on Jan 16, 2009 at 11:27 UTC ( #736802=note: print w/ replies, xml ) Need Help??


in reply to Re^2: IO::Lambda: call for participation
in thread IO::Lambda: call for participation

In that process I realized that if you indent normally, then after any complex sequence of events you are indented off of the right hand side! And what, exactly, does that indentation tell you? Basically that this happens before that happens before the other thing. Nesting of braces is carrying sequencing information, which we normally don't bother indenting at all.

Well, rjbs got me converted to 2-space indents, so indentation is less of a beast to me. ;-)

On the serious side, I think as long as this is used for a linear execution sequence, what you say is true. And I think all the examples are pretty linear. But if you ever do multiple predicates at the same level, I would suspect that lack of indentation would make following the execution sequence a bit challenging.

My point is not that it can't be understood, but that one has to actually learn the library first and grok how it works before the code is "skimmable". That's an adoption barrier and probably makes maintenance in a larger team setting problematic.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


Comment on Re^3: IO::Lambda: call for participation
Re^4: IO::Lambda: call for participation
by dk (Chaplain) on Jan 16, 2009 at 13:07 UTC
    I agree with your arguments that this is an adoption barrier. However it would be pity to abandon that style only because it is a barrier. Perhaps, introductory documents and examples indeed shall feature only the usual indentation, while formatting of all other code would be up to the programmers involved.

    On the side note, even though having multiple predicates is perfectly viable, it is very rarely needed.

Re^4: IO::Lambda: call for participation
by tilly (Archbishop) on Jan 16, 2009 at 18:25 UTC
    Well if you ever do multiple predicates at the same level, you'd have to make it visually clear that you're doing something weird. Certainly the indentation would change. I don't know how though, because I haven't thought through any such examples.

    As for difficulty in trying to grok how the library works, my goal it to make that much, much easier than it is now. If I succeed then it should be a fairly short learning curve to come up to speed on the library.

    That said, I think there are some features that will turn out to be important that aren't there yet. One is that I'd like to have a "stack context" that you can keep adding to. If a problem happens, it would be nice for debugging purposes to figure out how this sequence of execution got *here*, but right now there isn't a stack backtrace that I know of. I'd like to see better facilities for exception handling, but that is likely to be hard to do. And I'm sure that there are some spit and polish issues that will become apparent once people try to use it.

    But I'm interested enough in what's there now to look at it in more depth.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-10-21 22:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls