I hope we're not starting a flamewar here... Note that I'm not going to 
irrationally bash Perl 6 here (despite my past record about it). Read on for 
the rest of my reply.

On Friday 14 July 2006 15:46, [EMAIL PROTECTED] wrote:
> hi
>
> some thoughts came to mind after listening to audrey's talk.
>
> what reasons are there to use perl 6?

At the moment, I believe that the only reason is if you want to play with it. 
Pugs, which is the only mostly-complete Perl 6 implementation is not 
production ready. Executing Perl 6 using it is still very slow. People wrote 
an IRC bot in Perl 6, but I'm not sure anyone writes production code with it.

In the future, Perl 6 aims to be Yet Another Dynamic/Agile/"Scripting" 
Language (YADASL) like Perl 5, Python, Ruby, Tcl, PHP, and to lesser extent 
other languages like Scheme, Common Lisp and Smalltalk are, as well as niche 
languages like io, JavaScript and Lua. (and plenty others I did not mention). 
It aims to be to many extents superior to some of these, offering more 
expressive power. While probably not as powerful as a Lisp dialect (assuming 
it has a usable implementation) can be, possibly with some userland 
customisations, it will still aim to be very powerful, and as opposed to Lisp 
will support a default richer grammar and syntax (with various 
prefix/suffix/infix/ternary/etc. operators).

> what can it do that i can't do with with X language?

The short and very misleading answer is: nothing. Every language which can 
implement any other programming language (even very limited ones like a 
Turing Machine or the Lambda Calculus) is Turing Complete:

http://en.wikipedia.org/wiki/Turing_complete

Turing Completeness means a language can do everything another language can 
and not more. 

So for example, you COBOL can do everything that Common Lisp does. However, 
naturally, some languages are more powerful than other languages. What 
exactly power is, is hard to measure, but Paul Graham claims 
that "Succinctness is Power":

http://www.paulgraham.com/power.html

So the less code a language requires for achieving a certain task, the more 
powerful it is. According to this measurement, Perl 5 and other Dynamic 
languages are considered some of the most powerful languages today, since one 
can implement a working solution for many problems with very little code and 
thinking effort. Perl 6 aims to be even more expressive.

While many people think of Python and Ruby as incremental improvements upon 
Perl (in some respects, at least), Perl 6 is considered a very large step 
forward.

> why write something using perl 6?
>

It's very hard for me to tell you when to write something in language X or in 
language Y. If I have a choice, I'm writing most of my code in Perl 5, since 
that's what I know best and like. For work, I'm writing mostly PHP 5 because 
that's what our existing codebase is written in (but we still sometimes use 
Perl for help). I'm also writing a lot of scripts in bash because I feel that 
bash is better suitable for this. (Like if I have to call a lot of commands). 

I'm using ANSI C or C++ for projects that are written in it. I also used C for 
some of my pet projects ( http://www.shlomifish.org/open-source/projects/ ) 
because it was more suitable for it (because of speed considerations, 
availability of the pthreads API, kernel-land code, etc.). I've also been 
doing a small amount of Java and C# hacking, for projects that were 
originally written in it.

I've also written some code for play, homework, etc. in Haskell, Scheme and 
other languages and am now trying to learn Smalltalk and Common Lisp (and 
plan to learn more languages that I find interesting.). However, I don't feel 
like I need to program something practical in these language if I have a 
choice.

What's my point? It's hard for me to tell whether Perl 6 would be more 
suitable for some problems than Perl 5. Perl 5 is not going away, anyway, and 
neither is perl5 at least until PONIE or a different implementation takes 
over. Python, Ruby, etc. also have their strengths. Perl 6 does not aim to 
replace anything, including not Perl 5.

What to program in what language is a very complex issue, that is very hard to 
tell and varies from programmer to programmer according to their likes, 
knowledge, and external constraints. For example, on the IRC I met a Russian 
programmer who writes Perl code in his workplace because that's what they 
use, but he'd rather use O'Caml.

>
> don't misunderstand- learning new stuff is good, and programming
> languages are interesting in their own right, and perl is cool; but i
> have this nagging feeling that i'm missing something ...
>
> maybe someone wrote up something on this already.

Well, as an alternative take for "Why *not* Perl 6?" you might wish to look at 
my own writings here:

http://www.shlomifish.org/rindolf/ (A Partial spec for "Rindolf" - a Perl 
5-derived (and mostly compatible) language intended as an anti-thesis to Perl 
6).

http://freshmeat.net/articles/view/1339/ ("Critique of Where Perl 6 is 
Heading" - also read Mike Schwern's comment there, and there are many other 
comments).

I daresay I have second thoughts about the perl6-crit article. After attending 
some presentations about Perl 6 (by Gaal Yahas and Larry Wall), I am finding 
more and more perceived problems with Perl 5, some of which will be fixed to 
some extent in Perl 6. Nevertheless, these articles raise some concerns I and 
other people (some of which I talked to about it) have had about Perl 6.

Some anti-Perl 6 aphorisms, I can think of (don't take them too seriously):

* "Perl 6 is going to be a wonderful language. Too bad it's not going to be 
Perl."
* "Will the Perl 6 motto be 'There are too many ways to do it?'"

There were also a few concerns about the large amount of effort going in the 
work on Parrot, the Perl 6 core language and Pugs, about the fact that 
they've been taking a few years now, and whether it will all be wasted.

Finally, I started to formulate Park, which is a Lisp that is intended to be 
as useful as Perl 5, Python, and friends:

http://www.shlomifish.org/park-lisp-fooware/

At the moment, I only have a few ideas and the start of an informal spec, but 
I decided that I also would like to better learn Common Lisp (which I only 
sort of know by reading "On Lisp") so I can both learn what can already be 
achieved there, and also try to implement Park on top of CL. Don't hold your 
breath for Park ("A Lisp that starts with a 'P'"), but I just wanted it to be 
of note.

My relatively new signature is this time all the more appropriate.

Cheers!

        Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      [EMAIL PROTECTED]
Homepage:        http://www.shlomifish.org/

Chuck Norris wrote a complete Perl 6 implementation in a day but then
destroyed all evidence with his bare hands, so no one will know his secrets.
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to