KBD

Keith Devens .com

Friday, September 5, 2008 Flag waving
All warfare is based on deception. – Sun Tzu (The Art of War (I.18))
← 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)
:

September 2008
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930 



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

Recent comments XML

new⇒I hate ASP.NET

Agree.

You can add VS to the​list....

graffic: Sep 5, 5:15am

new⇒Girls, please don't get breast implants

Well alright I just read my above​comment and I wanted to add​this...I shou...

76.66.140.8: Sep 4, 7:31pm

Spider solitaire

I don't think the question was​necessarily if there are unbeatable​games.  ...

Jared: Sep 4, 12:44pm

Convert Pantone Colors to RGB and Hex - Color Conversion Chart

The colors on those website don't​seem to relate to the pantone data​we hav...

blah: Sep 3, 10:12am

Generated in about 0.656s.

(Used 8 db queries)

mobile phone