KBD

Keith Devens .com

Saturday, March 20, 2010 Flag waving
That is because you crazy! – Ikea
← 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)
:

March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



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

I hate ASP.NET

I hate ASP... I was doing wonders​with PHP, then suddenly one of my​clients...

Johnies: Mar 17, 6:14am

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.103s.

(Used 8 db queries)