A6, parameters

2003-03-19 Thread Ralph Mellor
If one deploys a sub with optional-positional parameters, one can't add a required parameter later without breaking any existing calls that make use of any o-p parameters. Right? A6: "An rw parameter may only default to a valid lvalue. If you find yourself wanting it to default to an ordinary valu

how to code a lazy pipeline?

2002-12-11 Thread Ralph Mellor
How would one most nicely code what I'll call a lazy pipeline, such that the first result from the final element of the pipeline can appear as soon as the first result has been processed from the intervening elements? -- ralph

Dynamic scoping

2002-11-23 Thread Ralph Mellor
First, I'd like to confirm I've understood C and C right: 1. C dynamically scopes changes to a variable's value to the enclosing block. It does not dynamically scope the name. The variable can obviously be a global. It can also make sense if it is lexical. Is the latter currently al

Re: Delegation syntax

2002-10-11 Thread Ralph Mellor
> [proposal for delegation syntax, drawing from Class::Delegation] > > If something is part of the method interface, it ought to be declared > as a method. > > method steer is really(Wheel) is also(???) { .profit!!! } That's tidy, and is sorta on the lines of my own initial thoughts. But afa

Delegation syntax

2002-10-10 Thread Ralph Mellor
Problem: You want to use delegation rather than inheritance to add some capabilities of one class or object to another class or object. Solution: Use a PROXY block: class MyClass { PROXY { attr $left_front_wheel is Wheel; attr $right_front_wheel is Wheel;