KBD

Keith Devens .com

Friday, August 29, 2008 Flag waving
"It's no trick for talented people to be interesting, but it's a gift to be interested. We want... – Randy S. Nelson (dean of Pixar University)
← Java and Scripting?Psychology of weblog design →

Daily link icon Friday, June 13, 2003

Perl sucks at abstraction

Read this article to see exactly what I've been talking about. I gotta run because I'm meeting a friend somewhere in a few minutes, but the gist of it is this...

The inclusion of iteration as a core concept represents Perl design at its finest. Instead of providing a clumsy mechanism in non-core code, as Java and C++ (through its standard template library) do, Perl incorporates this pattern into the core of the language.

So the iterator pattern from GoF is a core part of Perl we hardly think about. The next pattern might actually require us to do some work.

This is such huge BS. With the Java version he gives code for, you could be iterating over a database record, the lines in a file, stuff coming over a socket, user events, who knows. The Perl version isn't using a design pattern. It's not abstracting anything. It's just having everything return lists! Big deal. The java version is much more powerful.

He highlights that the Perl 6 version will be able to have lists built lazily, and I think that might be able to match the power of iterators in general in languages like Java or C++, or Ruby (which actually does let you abstract different things to use the same loop syntax), which is why I'm hopeful about Perl 6.

← Java and Scripting?Psychology of weblog design →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

August 2008
SunMonTueWedThuFriSat
 12
3456789
10111213141516
17181920212223
24252627282930
31 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

new⇒Johnny Walker Blue Label

Wow, thanks for the scotch review​:D

Lagavulin and Laphroaig are​some of...

Keith: Aug 29, 3:35pm

Girls, please don't get breast implants

Wow, After all this time, the​comments on this page continue to​grow. It wa...

Ajeet: Aug 25, 2:36am

Generated in about 0.188s.

(Used 8 db queries)

mobile phone