Meaning of Orthogonality

G

Gregory Toomey

Edward said:
Perl is said to be an "orthogonal" programming language.
What does it mean?

Regards
Edward WIJAYA
SINGAPORE

The computer science meaning is derived from the matematical meaning.

The simplest meaning is "at right angles". Think of walking along and
throwing a ball in the air - you can do one, or either, or both.
One thing does not effect the other, and the two combinations are possible
at the same time.
http://en.wikipedia.org/wiki/Orthogonal

The computer science meaning is
- a set of basic constructs
- there are many combinations of the basic constructs allowed.


For example, many of Perl's functions work on both scalars and arrays.

gtoomey
 
J

Joachim Pense

Edward Wijaya wrote said:
Perl is said to be an "orthogonal" programming language.
What does it mean?

The meaning of "orthogonal" is explained by Gregory in this thread. But who
said Perl was an orthogonal language? It is non-orthogonal by design, which
is generally considered an advantage.

Joachim
 
G

gnari

[about orthogonality]
For example, many of Perl's functions work on both scalars and arrays.

but many times, the scalar functionality does something different
than the other one, so I am not sure 'orthogonal' applies to Perl

in fact all the DWIMmery sounds pretty non-orthogonal to me.

gnari
 
E

Edward Wijaya

Perl is said to be an "orthogonal" programming language.
What does it mean?

Regards
Edward WIJAYA
SINGAPORE
 
A

A. Sinan Unur

[ please do not top-post ]
Mr. Wall said so can be found in Camel Book.

Could you give a page number please? I would like to see the quotation in
context.
 
T

Thomas Kratz

A. Sinan Unur said:
[ please do not top-post ]

Mr. Wall said so can be found in Camel Book.


Could you give a page number please? I would like to see the quotation in
context.

PP 3rd Ed, Page 28 footnote:

"Some folks feel that such redundancy is evil because it keeps a language
from being minimalistic, or orthogonal. But Perl isn't an orthogonal
language; it's a diagonal language"

Being able to read is an obvious advantage ;-)

Thomas
 
J

Jim Keenan

Edward Wijaya said:
Perl is said to be an "orthogonal" programming language.
What does it mean?
Says who?

Can you provide a link to a source so that we could evaluate the
statement/claim in context?

Thank you very much.

Jim Keenan
Brooklyn, NY
 
X

Xaonon

Jim Keenan said:
Says who?

Can you provide a link to a source so that we could evaluate the
statement/claim in context?

From perlhack, item 2:

-> Does concept match the general goals of Perl?
-> These haven't been written anywhere in stone, but one
-> approximation is:
->
-> 1. Keep it fast, simple, and useful.
-> 2. Keep features/concepts as orthogonal as possible.
-> 3. No arbitrary limits (platforms, data sizes, cultures).
-> 4. Keep it open and exciting to use/patch/advocate Perl everywhere.
-> 5. Either assimilate new technologies, or build bridges to them.

And implicitly from the Camel book, page 219:

-> Since @_ is just a regular array with an irregular name, you can do
-> anything to it you'd normally do to an array.*
->
-> * This is an area in where Perl is /more/ orthogonal than the typical
-> programming language.
 
J

John Bokma

Purl said:
I like to think of Perl as a matrix language.

You watch too much movies.
Paths can intersect, change directions, either outward or inward,
even loop around in circles, recurse or lead to an eventual exit.

That's a graph. So Perl is a graph language :-D
 
E

Edward Wijaya

Mr. Wall said so can be found in Camel Book.

Perl is said to be an "orthogonal" programming language.
What does it mean?

Regards
Edward WIJAYA
SINGAPORE
 
G

Greg Miller

Perl is said to be an "orthogonal" programming language.
What does it mean?

Means it has more than 8 sides. ;) Seriously, loosely
speaking it means all features in the language are created equally.
E.G. In perl you can return an integer from a function, but you can't
return an array from a function (a pointer to an array doesn't count).
So Perl is not orthogonal (like everyone else said). In an completely
orthogonal language, you should be able to have an array of functions.
Not that it's useful, but that's what it would have to do.
But, in general, when people refer to whether or not a
language is orthogonal, they're referring to whether or not all of the
language's data types can be used like any other. E.G. operator
overloading, returning an object from a function, arrays of arrays of
structs of objects.
I'm not sure how this word came to be associated with
programming languages. The mathematical definition says two things
are orthogonal if they are at 90 degrees to each other. If you try to
adapt that to programming language structures, you'd think an
orthogonal language is one that treats everything differently than
everything else. But in the programming languages context, it means
to treat everything the same.
Now that I've said that, I've noticed the mathematical
definition of orthogonal, and the programming language definition are
orthogonal to each other! Maybe it was a joke someone made that got
out of hand.

Oh, and here's a programming language which follows the
mathematical definition of orthogonal:
http://www.muppetlabs.com/~breadbox/orth/
I'm assuming (hoping) that really is a joke.
 
E

Edward Wijaya

Yes my mistake....Thanks for correcting me.

A. Sinan Unur said:
news:eek:[email protected]: [ please do not top-post ]

On Wed, 19 May 2004 08:43:13 -0000, Edward Wijaya


Perl is said to be an "orthogonal" programming language.
What does it mean?

Mr. Wall said so can be found in Camel Book.

Could you give a page number please? I would like to see the quotation
in context.

PP 3rd Ed, Page 28 footnote:

"Some folks feel that such redundancy is evil because it keeps a
language from being minimalistic, or orthogonal. But Perl isn't an
orthogonal language; it's a diagonal language"

Being able to read is an obvious advantage ;-)

Thomas
 
B

Ben Morrow

Quoth Greg Miller said:
Means it has more than 8 sides. ;) Seriously, loosely
speaking it means all features in the language are created equally.
E.G. In perl you can return an integer from a function, but you can't
return an array from a function (a pointer to an array doesn't count).
So Perl is not orthogonal (like everyone else said). In an completely
orthogonal language, you should be able to have an array of functions.
Not that it's useful, but that's what it would have to do.
I'm not sure how this word came to be associated with
programming languages. The mathematical definition says two things
are orthogonal if they are at 90 degrees to each other. If you try to
adapt that to programming language structures, you'd think an
orthogonal language is one that treats everything differently than
everything else. But in the programming languages context, it means
to treat everything the same.
Now that I've said that, I've noticed the mathematical
definition of orthogonal, and the programming language definition are
orthogonal to each other! Maybe it was a joke someone made that got
out of hand.

No, it does make sense. It means, to take you example, that the
definition of 'function return value' is orthogonal to the definition of
'data types': any function can return any data type. Think vectors: two
vectors are orthogonal iff any combination gives another unique vector.

Ben
 
A

Anno Siegel

Greg Miller said:
Perl is said to be an "orthogonal" programming language.
What does it mean?
[...]

I'm not sure how this word came to be associated with
programming languages. The mathematical definition says two things
are orthogonal if they are at 90 degrees to each other. If you try to
adapt that to programming language structures, you'd think an
orthogonal language is one that treats everything differently than
everything else. But in the programming languages context, it means
to treat everything the same.

The mathematical sense of "orthogonal" from which the usage in computer
languages derives isn't so much "90 degrees", but the concept of
orthogonal coordinates (or matrices), where the angles between any two
axes are 90 degrees. In such a coordinate system you can choose x, y,
and z independently. In an oblique system, the coordinates depend on
one another.

That idea carries over nicely to the usage in computer languages, where
you get to choose (say) an operator and the type of operands independently,
whereas in less orthogonal languages the choice of one may determine the
choices for the others. In mathematics, at least the dependency is linear,
in computer languages it can be arbitrary.
Now that I've said that, I've noticed the mathematical
definition of orthogonal, and the programming language definition are
orthogonal to each other! Maybe it was a joke someone made that got
out of hand.

I think it's a good metaphor, taken as above.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,154
Messages
2,570,870
Members
47,400
Latest member
FloridaFvt

Latest Threads

Top