This depends a bit on what you mean by "io". Do you think that the "kill" syscall represents io? What about "reboot"? Certainly all syscalls interact with the operating system, but not all syscalls interact with the user, a disk, a printer or the network. But yeah IO is sort of important. And since perl has a syscall builtin it is certainly powerful enough in this respect too.

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.

my $result =[l] calc(30,20,"FooBar"); my $result2 =[l] calc($result,20,"YoYo"); my $result3 = $result + $result2;
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.

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.