LWN.net Logo

A Perl 6 status update

A Perl 6 status update

Posted Jan 2, 2008 15:53 UTC (Wed) by dskoll (subscriber, #1630)
In reply to: A Perl 6 status update by pynm0001
Parent article: A Perl 6 status update

I've come to this thread pretty late but I find it troubling that so many people are whining about Perl6.

I run a company that uses Perl as its primary development language. It has always been difficult to find talented Perl programmers. Perl 6 is making it *much* more difficult because the whole development process has made Perl look like a crazy experiment rather than a practical language for building software. It's easy to say "if you don't like Perl 6, use Perl 5" but you're discounting the real harm done to Perl and the Perl community by the "new-age experimental" Perl 6.


(Log in to post comments)

A Perl 6 status update

Posted Jan 2, 2008 18:46 UTC (Wed) by rsidd (subscriber, #2582) [Link]

The unfortunate thing about Perl is that it was there first and acquired a huge base.  Like
Cobol.  Both, at least to my eyes, are write-only languages (and I don't think it depends on
the programmer's style).

As a previous poster said, Ruby is a good Perl6. Still, the complaints seem excessive. If
Perl5 will continue to be maintained, or Perl6 can continue to load Perl5 modules, great for
those who need to maintain perl code.  We still have Fortran77 compilers, so I expect Perl5
will live a long time yet.

A Perl 6 status update

Posted Jan 2, 2008 19:10 UTC (Wed) by pynm0001 (guest, #18379) [Link]

> Both [Perl and Cobol], at least to my eyes, are write-only languages
> (and I don't think it depends on the programmer's style).

Well programmer's style can fix most of what's hard to read about Perl.  
From my experience the problems that are left are:

* Regexs.  But pretty much every language tries to be Perl compatible in 
this regard so we're stuck with it.  And anything much more verbose would 
stink IMO (and Perl provide commented regexps as well)

* Indirection syntax/sigils: I'm not opposed to sigils (as that's what 
allows Ruby to avoid the self.crap everywhere that Python is plagued 
with) but Perl makes it confusing and even worse, the lists and hashes 
require references in order to work recursively which is incredibly 
annoying when you're doing hashes of lists, etc.  This is something which 
I hope they fix for Perl 6.

* Exception handling by checking $@: die/eval/$@ is a pretty crappy means 
of exception handling by it's at least consistently crappy. :-/

Some other things (like the new defined-or operator //= for example) are 
things which I avoid using out of respect for other programmers in my 
project who have to maintain the script when I'm away but I'd expect 
people programming Perl to get acquainted with.

There's lots of other things (like a good 80% of the global $ variables) 
that although are valid Perl should probably be shot.

A Perl 6 status update

Posted Jan 3, 2008 20:36 UTC (Thu) by chromatic (guest, #26207) [Link]

As a previous poster said, Ruby is a good Perl6.

Anyone who says that in seriousness knows very little about either Ruby or Perl 6. Ruby has some nice features, but it has some serious shortcomings (as does Perl 5). Perl 6 corrects those.

A Perl 6 status update

Posted Jan 5, 2008 9:18 UTC (Sat) by njs (guest, #40338) [Link]

As phrased, you seem to be asserting that (a) Perl5 has shortcomings, (b) Ruby has
shortcomings, (c) Perl6 has no shortcomings.  I hope that isn't what you mean, but you see how
it makes people suspicious of Perl6 when its proponents seem to be advertising it that way...

A Perl 6 status update

Posted Jan 5, 2008 15:03 UTC (Sat) by hummassa (subscriber, #307) [Link]

> As phrased, you seem to be asserting that (a) Perl5 has shortcomings,
> (b) Ruby has shortcomings, (c) Perl6 has no shortcomings.  I hope that 
> isn't what you mean, but you see how it makes people suspicious of
> Perl6 when its proponents seem to be advertising it that way...

I think what he meant was "(c) Perl6 has /other/ shortcomings, but not 
the same ones"

A Perl 6 status update

Posted Jan 7, 2008 5:17 UTC (Mon) by chromatic (guest, #26207) [Link]

Perl 6 may have shortcomings.  We won't know what they are until people start using it as much
as they use Perl 5.  We hope we've designed out most of them.  We've certainly tried to design
away the keenest problems of Perl 5, Ruby, C++, and Java.

A Perl 6 status update

Posted Jan 2, 2008 18:57 UTC (Wed) by pynm0001 (guest, #18379) [Link]

All I'm saying is that much of the "damage to the community" is your 
standard "Me Too!-ism".  It has become quite fashionable to beat up on 
Perl and sadly those kinds of things are self-perpetuating.  It always 
takes awhile for people to ease up (I suspect the initial distate for 
Perl came because of how much nicer Python and then Ruby seemed to be and 
because Perl was King of the Hill).

The Perl5 community is dated, there is simply no way around it.  It's not 
something the Perl guys can fix easily (especially as long as people 
continue to believe Perl is strictly write-only).  I guess they're 
attempting to fix it by Perl6 so I guess it would be better if it were 
out sooner rather than later but things don't always work that way.

And anyways, were companies really under the impression that Perls 1-5 
were *not* some kind of wacky New Age experiment?  Perl's idea of OOP is 
blessing objects for crying out load.  Typeglobs!  There's modules out 
there to program Perl in Latin!  The language has never had a spec, just 
the interpreter and later the test suite.

So in that regard Perl6 is nothing markedly inferior.

A Perl 6 status update

Posted Jan 2, 2008 23:47 UTC (Wed) by sbergman27 (guest, #10767) [Link]

"""
I suspect the initial distate for 
Perl came because of how much nicer Python and then Ruby seemed to be and 
because Perl was King of the Hill.
"""

For what purpose?  One off scripts?  1990's cgi routines?  Or real programs?  For real
programs, you can replace "seemed to be" with with "are".

"""
The Perl5 community is dated, there is simply no way around it.  It's not 
something the Perl guys can fix easily (especially as long as people 
continue to believe Perl is strictly write-only).  I guess they're 
attempting to fix it by Perl6
"""

Which makes Perl 6 a new language, with a new purpose, which needs to prove itself just like
any other new language on the block.  The first thing it needs is a working and practical
implementation.  And then we can get down  to concepts like usefulness and utility.  Sometimes
I get the impression that some people think that the names "Perl" and "Wall" should just get
them in the door automatically.

To me, those names symbolize quirkiness, inconsistency, unreadability, and 1997.  So Perl 6
has a lot to prove to me.

A Perl 6 status update

Posted Jan 3, 2008 5:39 UTC (Thu) by pynm0001 (guest, #18379) [Link]

>> I suspect the initial distate for Perl came because of how much nicer
>> Python and then Ruby seemed to be and because Perl was King of the
>> Hill.

> For what purpose?  One off scripts?  1990's cgi routines?  Or real
> programs?  For real programs, you can replace "seemed to be" with
> with "are".

Well IMHO real programs should be written in C++/C# (or Java if you're 
feeling masochistic) or Python/Ruby with enough assertions and test 
suites to catch the silly mistakes which a compiler would typically 
catch.  Python and Ruby are great for very simply applications but maybe 
it's just me but both give me trouble hunting down the bugs.

> Which makes Perl 6 a new language, with a new purpose, which needs to
> prove itself just like any other new language on the block.  The first
> thing it needs is a working and practical implementation.

It has that.  It's called Pugs. (http://www.pugscode.org/)

To be honest I'm not sure why they haven't released it or the Parrot 
backend-based Perl6 as at least a technical preview yet so people can at 
least play around with it.

I'm also not sure as to what steps are left before Perl 6 can be 
released.  Are they waiting for features to be implemented, is it too 
buggy, is Parrot not ready, etc. etc.?

None of that however warrants the kind of reaction it has been getting.  
I don't know who's been claiming that Perl6 is the next coming of the 
Messiah but all I'm saying is the arguments against it are more typically 
FUD than anything substantive, and I haven't yet seen a response to that 
which shows otherwise.

A Perl 6 status update

Posted Jan 3, 2008 5:56 UTC (Thu) by rsidd (subscriber, #2582) [Link]

Python and Ruby are great for very simply applications but maybe it's just me but both give me trouble hunting down the bugs.

Probably just you. I don't know much about Ruby, but Python, unlike C and C++, has "tracebacks" when it encounters a problem, and throws exceptions that you can catch, rather than just segfaulting on you. Plus of course you can do high-level programming that eliminates a huge category of bugs (bounds-checking, memory management, side-effects, etc). And it's easy to read, so you catch logical bugs by inspection. Programming in python takes me a tenth the time it would take in C, and it is always my choice when speed is not absolutely critical. (And when speed is important but not totally critical, I have used ocaml and am seriously looking at haskell now.)

A Perl 6 status update

Posted Jan 3, 2008 7:01 UTC (Thu) by pynm0001 (guest, #18379) [Link]

> I don't know much about Ruby, but Python, unlike C and C++,
> has "tracebacks" when it encounters a problem, and throws exceptions
> that you can catch, rather than just segfaulting on you.

Ruby does.  So do C/C++, although they are called "backtraces" there.  
I've never used nonstandard C Structured Exception Handling (or the more 
standard setjmp()/longjmp()) but C++ exceptions have not given me 
trouble.  Old versions of g++ had problems throwing exceptions across .so 
boundaries however.

> Plus of course you can do high-level programming that eliminates a huge
> category of bugs (bounds-checking, memory management, side-effects,
> etc).

Yup.  Ruby/Python add some categories of their own of course.  This is 
probably due to my C++ background but the fact that everything is like a 
reference in Ruby (ie. a = b translated to Obj *a = b instead of being a 
copy constructor) has tripped me up to no end.  Freezing Ruby objects is 
handy for tracking down that kind of bug however.  I simply will never 
get used to having to use self.foo in Python however, no matter how hard 
I try.  That alone has caused me so much grief.

I will point out that you will still get resource leaks using Ruby and 
Python if you're not careful.  They will simply not be memory leaks.  
This is one area where C++ shines (C# managed to steal a good chunk as 
well).  I'm referring to the Resource Acquistion Is Initialization idiom 
(http://en.wikipedia.org/wiki/RAII).  Even among C++ programmers it's not 
used often enough due to the need to define a class for more resources 
you use first but if you use it consistently you can practically 
eliminate resource leaks entirely.  It's also useful with stuff like 
mutexes/thread-locks, etc.

> And it's easy to read, so you catch logical bugs by inspection.

And the C++ compiler catches them with 10-page template errors messages.  
ah well. :) Seriously though, this hasn't typically tripped me up, and 
the next revision to C++ should help with auto variables that infer their 
type automatically. i.e.:

for(std::list<Foo>::const_iterator i = list.begin(); i != list.end();
    ++i) {...}

becomes

foo(auto i = list.begin(); i != list.end(); ++i) { ... }

i still has a static type and it's still checked, but you don't have to 
type it all out.

> Programming in python takes me a tenth the time it would take in C, and
> it is always my choice when speed is not absolutely critical.

Who programs in C anymore?  You'll notice I never mentioned it.  People 
like to ding on C++ as just C with objects but that's simply not true.  I 
especially like how Java 1.5 has finally almost caught up to the syntax 
mess of C++.

Python is a great language though, although I only use it over Ruby 
when... speed is an issue but not so much to where I turn to C++.  I 
still do one-off scripts in Perl just out of habit.  But anytime I've 
tried to make a large program in Python I've typically been able to get 
the prototype working in Python first but the extra debugging time makes 
the coding time difference not as drastic.

> (And when speed is important but not totally critical, I have used
> ocaml and am seriously looking at haskell now.)

I've looked at them both (and Erlang, and Common Lisp, and Scheme/guile, 
and etc.) but functional languages to be honest still completely kick my 
ass.  I understand and like things like lambda functions and closures, 
and I think I mostly understand the concept, but it doesn't translate to 
a program design so I just sit there at the editor feeling dumb. :)

A Perl 6 status update

Posted Jan 3, 2008 20:24 UTC (Thu) by sbergman27 (guest, #10767) [Link]

"""
None of that however warrants the kind of reaction it has been getting.  
I don't know who's been claiming that Perl6 is the next coming of the 
Messiah but all I'm saying is the arguments against it are more typically 
FUD than anything substantive, and I haven't yet seen a response to that 
which shows otherwise.
"""

That categorization of people's reactions as FUD is a bit unfair, and sounds awfully
defensive.  The "reaction" that I have seen have been mostly observations that it has been 8
years since the announcement and there are still no real deliverables.  People are pointing
out pugs, and I suppose that's fair.  But still, it does not appear that Perl 6 is anywhere
near release status.  That's not FUD.  It's pointing out reality.  The fact that it might be
construed to reflect badly upon Perl as a language does not make it FUD.  If there is real and
justifiable "Uncertainty" and "Doubt" regarding a project, based upon fact, making some people
"Fearful" of committing their own long-term projects to it... is that really FUD?  I call it
good sense.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds