KBD

Keith Devens .com

Saturday, March 20, 2010 Flag waving
Communicating badly and then acting smug when misunderstood is not cleverness. – Randall Munroe (xkcd)
← Why I don't grok (XML) namespacesRoad Trip Pictures! →

Daily link icon Tuesday, June 3, 2003

Perl inflexible with abstractions

Because of Perl's extreme DWIMmetry, and use of different syntaxes for similar things, it winds up being often less flexible from an abstraction standpoint than more regular languages like even Java are capable of being.

For instance, you can do a while(<FOO>){} loop with an open filehandle. If you open a filehandle like this: open $foo, 'filename' - then you can do it like: while(<$foo>){}. Perl will also let you read from an array like this: while(<@foo>){}, but because Perl insists on using different syntaxes for these things, I can't make the subject of the same while loop be either an array or a file (or a socket, etc.).

← Why I don't grok (XML) namespacesRoad Trip Pictures! →

Comments XML gif

Adam Vandenberg (http://flangy.com) wrote:

YES.

I've been learning Scheme recently on the theory that it never hurts to know more languages, and LISP-likes/functionals are an area I'm weak in. One of the big advantages of Scheme is the extreme regularity of syntax. It makes nearly everything composable and decomposable, which makes building abstractions really easy.

I wouldn't want to write everything in Scheme, but it sure seems handy for doing compiler-generators, which is what I'm playing around with now.

∴ Adam Vandenberg | 4-Jun-2003 6:17pm est | http://flangy.com | #2139

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.139s.

(Used 8 db queries)