In Scheme, all I have to do is signal that a part of my code has no side effects and then my macros can do things like parallelise all the arguments to each function call*. I don't have to think about it any further.
I guess that's an ability that could be build into Perl6 (or even Perl5). That is, signalling that there are no side-effects.
The interesting case is of course, what if the programmer tells the compiler that there are no side-effects, but in reality, there are? The programmer could be deliberately lying, or just not knowing the internals of the language implementation well enough to know (or it could be that in the implementation (aka compiler/interpreter/run-time environment) the programmer developed the program on, there were no side-effects, but there are in the implementation the program is actually run on).
The idea of having parts that are side-effect free available for parallellization is great - but I rather have the compiler determine this for me than the programmer. (Of course, the compiler cannot determine this always, or else one could solve the halting problem. Unless the language is side-effect free to begin with.)
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||