Yes. I certainly agree with the practical side of what you were saying. The structure of a programming language is extremely important. It shapes how we think. I mean, just think about 1986 and how they shape language to shape thought. Language designers get to do the very same things. And it is very exciting. I just pounced on the theoretical point (because I was dodging real work).
As for Lazy evaluation. Don't go totally down that path. The functional language community has tried this in Haskell, and while it has theoretical beauty it has practical problems. Some of the practical problems have to do with side effects. In the presence of side effects you face problems with incoherency and such depending on reduction order and other estotheric things. (There are papers written on this of course, these people write more paper than code sometimes).
That being said. Maybe partial laziness might be a good thing. Perhaps partial laziness could be implemented with a keyword and a source filter in Perl 5. Hmm. Yes. Lazy assignments.
We'd have to take care that it was never evaluated more than once though. Hmm. I think this might be doable. Yes a source filter and a hidden tied scalar is what we need. And some duct tape.my $result =[l] calc(30,20,"FooBar"); my $result2 =[l] calc($result,20,"YoYo"); my $result3 = $result + $result2;
Danged. Now I forgot what my post was about. Anyhow, the musing seem interesting.
A quick edit.. A search on CPAN returned: http://search.cpan.org/~jenda/Data-Lazy-0.5/Lazy.pm
I would still want it in the semantics though, so maybe just couple it with a source filter.
In reply to Re: Re: What could I do with just Perl?
by dref
in thread What could I do with just Perl?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |