Fo instance you compare while (<>) with for and discuss their orthogonality. These are flow control structures and not solutions and thus to me to discuss their orthogonality is meaningless. I mean if I have
Then the loops are not orthogonal. I cannot make an arbitrary change to either without considering the effect on the other (at the bare minimun the inside loop affects the outside by changing $_, and obviously the inside is dependant on the <> operator).while (<>) { my $hexstr=""; foreach (split //) { $hexstr.=sprintf"02X",ord; } print $hexstr; }
But if i rewrite that as such:
Now the loops _are_ orthogonal. I can make arbitrary changes to either without effecting the other in the slightest. So to me a control structure is never explicity orthogonal or not to another control structure. It is only when the two structures are _used_ to achieve a goal that their orthogonality may be discussed with any meaning.sub as_hexstr { local $_=shift; my $hexstr=""; foreach (split //) { $hexstr.=sprintf"02X",ord; } return $hexstr; } while (<>) { print as_hexstr($_); }
Perhaps im missing something here, if so then hopefully you or one of the other monks who has thought about the orthogonality of languages can straighten me out....
Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.
In reply to Re: Re: (FoxUni) Re: (OT) On Orthogonality
by demerphq
in thread (OT) On Orthogonality
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |