Programming Paradigms on Perl6

Skip to first unread message


Mar 29, 2005, 4:36:03 PM3/29/05
Hi Folks,
I'm used to be a user of Perl5 but quite (un-)used to be a user of the
Perl6 newsgroup (in fact it is the first time at all that I'm
participating to a newsgroup).
Now, since I'm programming a lot in Perl5 (spaghetti code of course),
few months ago it happened that I was "colliding" with Perl6 and I
started to read about it.

For the few things that I've read, it seems to me that Perl6 is a
(sorry for my italianism) "cantiere a cielo aperto".
That's maybe disappointing for the users of Perl6 (WWW you remeber what
it meant at the beginning?), but on the other hand, it is a very
interesting situation, since it encourages creativity and exchange of

Now, even if I don't know well the design stage of perl6, I have maybe
one interesting issue.
Few months ago I read on wikipedia about programming paradigms,
( and I was actually
attempting to create a Perl code generator which was supporting one of
those paradigms (program by delegation). Beh I finally still have to
finish the generator (due mainly to my 17 months old daughter), but
that idea triggered a discussion with my colleagues, and I was actually
at the end thinking, that Perl 6 could be a fantastic language for
implementing "active" support for programming paradigms.

Let me explain:

For perl5, for example, you have the choice between oo and functional
programming, altough oo is not "pure" and you have few "special"
functions to use (bless, @ISA... ) to "make" perl 5 an OO language.
This fact disturbs unfortunately a lot of OO-purists, who turns the
back to Perl actually due to a detail issue.

Personally I think that this is an error and it should be avoided on
Perl6. How? One could play with the concept of context and say, for
example, at the beginning of a module, a kind of instruction like
"paradigm OO programming" which would mean to Perl:

dear perl, now I'm programming OO-Perl, so please, dear Perl follow the
OO rules and let me avoid to use @ISA and bless (use them implicitly
for me), and check that I'm using new as a method to instantiate a
class, and, please let me define my level of privacy
(private/public/friend) for class varîables.

Another kind of instruction could be "paradigm program by delegation"
which would mean to Perl:

please perl give me support for programming by delegation. If I define
one class
as delegatee of the other class, occupy yourself of the details so that
delegation happens really for each method I'm defining on the master

And so on ...

To finish my issue I would point out the advantages of this approach:

1. It is on the "true" Perl philosophy: let's the driver decide where
he wants to go, and give him a powerful car (driving license is his

2. Would attract other folks who are now residing on other scripting
languages (think about phyton, PHP and ruby, what about attempting to
pump out Java winnies?)

3. Would add other original features, which are currently in
experimental languages (lava for ex.)

4...(there is surely a fourth reason isn't it?)

So, sorry for your time and thank you if you followed me till the end
of my posting. I hope someone reads it and really answer me before year


Reply all
Reply to author
0 new messages