in reply to Re: (FoxUni) Re: (OT) On Orthogonality
in thread (OT) On Orthogonality

I find it really interesting that people keep considering orthogonality in the context of languages. Ive never thought about languages being orthogonal or not. To me orthogonal only applies to solutions (algorithms etc.) and not to the language the solutions are implemented in.

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

while (<>) { my $hexstr=""; foreach (split //) { $hexstr.=sprintf"02X",ord; } print $hexstr; }
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).

But if i rewrite that as such:

sub as_hexstr { local $_=shift; my $hexstr=""; foreach (split //) { $hexstr.=sprintf"02X",ord; } return $hexstr; } while (<>) { print as_hexstr($_); }
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.

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.

Replies are listed 'Best First'.
Re: Re: Re: (FoxUni) Re: (OT) On Orthogonality
by Anonymous Monk on Apr 17, 2002 at 15:45 UTC
    To me orthogonal only applies to solutions (algorithms etc.) and not to the language the solutions are implemented in.

    Take one large step back. Designing a programming language is just another problem. Perl and Python are just two solutions, with Perl being the least orthogonal of the two.

      Designing a programming language is just another problem.

      Agreed, so there are parts of the implementation of that language that are orthogonal to some other parts and parts that arent. But aspects of the language created will be orthogonal with respect to others depending on how they are used.

      To me what you just said is "Designing a truck is just another problem. Fords and GMs are just two solutions..."

      Again maybe ive missed something but you havent explained what it is.... :-)

      Hmm, on reflection maybe people mean

      Language X has more features that are orthogonal with respect to its other features than language Y.

      Is that what you mean?

      Yves / DeMerphq
      ---
      Writing a good benchmark isnt as easy as it might look.