Re: [Nolug] Crappy Perl Code

From: Mark A. Hershberger <mah_at_everybody.org>
Date: Mon, 14 Jul 2003 14:51:42 -0500
Message-ID: <87r84sga41.fsf@mah.mcdermott.com>

Judson Lester <jlester@tulane.edu> writes:

> Okay, now I understand. You're an emacs guy. Explains everything. :)

It probably does explain a lot.

I still don't get it when people say Perl is hard to read. Perl
without regular expressions doesn't look any more difficult to me
than other languages.

Perl with regular expressions looks a little more compact than other
languages with regular expressions.

If you want hard to read, try K[1]. Here's the Luhn algorithm[2] in K:

    luhn:{n:#x
      x[i]:2*0$'x@i:n-2+2*!_ n%2
      ~(+/{+/0$'$x}'x)!10}

Mark.

Footnotes:
[1] http://www.kx.com/index.htm

[2] http://www.kode-fu.com/geek/2002_09_15_archive.shtml#85465343

-- 
As long as you have mystery you have health; when you destroy mystery
you create morbidity.			     -- G.K. Chesterson
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/14/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST