Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Slashdot REBOL mention

From: joel:neely:fedex at: 30-Oct-2001 15:17

Hi, Ladislav, Ladislav Mecir wrote:
> ... As it looks, TCL really supports some level of dialecting and > that is why it surely is closer to natural languages than > Perl in this area. >
I guess it depends on which meaning of "closer" we're using... 1) Surface similarities? -- I do NOT want to program in anything that looks like human language. Consider that COBOL (the only major surviving programming language that pinned its hopes on being natural-language-like) looks like this: MOVE ZERO TO TOTAL. PERFORM ADDING-ACTION THRU ADDING-COMPLETE VARYING COUNT FROM 1 BY 1 UNTIL COUNT > 10. ... ADDING-ACTION. ADD COUNT TO TOTAL. ADDING-COMPLETE. instead of the far more succinct (although not fake English) total: 0 for count 1 10 1 [total: total + count] or $total=0; foreach my $count (1..10) {$total += $count} or even int total=0; for (int count=1; count<=10; ++count) {total += count} Natural languages are big, redundant, sloppy, ambiguous, and have no concepts relating to things that I have to think about when trying to compose non-trivial processes: (re)definition of concepts on the fly; scope of nomenclature; abstraction, parameterization, and reuse of concepts/patterns, etc. 2) Deep linguistic structure, Zipf's Law, ad hoc shortcuts, irregular and non-orthogonal grammer? -- I have yet to see a programming language that comes close to Perl. (It even has adverbs and a pronoun!) -jn- -- ; sub REBOL {}; sub head ($) {@_[0]} REBOL [] # despam: func [e] [replace replace/all e ":" "." "#" "@"] ; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"} print head reverse despam "moc:xedef#yleen:leoj" ;