Browse thread
Estimating the size of the ocaml community
-
Yaron Minsky
-
Christopher A. Watford
-
Frédéric_Gava
-
skaller
-
Erik de Castro Lopo
- Olivier_Pérès
-
Thomas Fischbacher
-
Frédéric_Gava
-
Thomas Fischbacher
- Paul Snively
- josh
- Richard Jones
-
Jon Harrop
-
Michael Walter
-
Jon Harrop
- Damien Doligez
- Thomas Fischbacher
- Michael Walter
-
Radu Grigore
- Gerd Stolpmann
- Jon
-
Jon Harrop
- Thomas Fischbacher
-
Richard Jones
- Thomas Fischbacher
- Oliver Bandel
-
Michael Walter
- Ville-Pertti Keinonen
- Oliver Bandel
- Basile STARYNKEVITCH
-
Thomas Fischbacher
- ronniec95@l...
- skaller
- chris.danx
-
Frédéric_Gava
-
Erik de Castro Lopo
- sejourne_kevin
- Stefano Zacchiroli
-
skaller
-
Frédéric_Gava
- Kenneth Knowles
- Michael Jeffrey Tucker
- Richard Jones
- Nicolas Cannasse
- Evan Martin
- Eric Stokes
- chris.danx
- Sylvain LE GALL
- sejourne_kevin
- Sven Luther
- Johann Spies
-
Christopher A. Watford
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-04 (10:03) |
From: | Thomas Fischbacher <Thomas.Fischbacher@P...> |
Subject: | Re: [Caml-list] Estimating the size of the ocaml community |
On Fri, 4 Feb 2005, Richard Jones wrote: > 8. Regular expressions in the language! There's a library for it. And indeed, looking at the evolution of perl, I would say that the way how regexps are integrated there is a mistake. The problem is that they are static in original perl. Last time I gave a course on perl, I found out that there is a very nice and convenient way to systematically explore many of its design mistakes: take language feature X (arrays, regexps, functions, whatever), and ask to yourself the question: how would you write a function that takes as argument a number N and generates N entities of the thingy under consideration that are provably different (and actually does prove this). Perl's arrays are very different from arrays in almost any other language - they try to catch a natural-language "plural" concept. But when one wants to address "this collection" directly, instead of just "those values", one needs a different handle. Original attempts to address such questions involved some - I'd say highly misguided - "symbolic reference to variable name" approaches. They more or less have been abandoned now, for good ("use strict"). By now, perl has an anonymous array constructor []. Concerning regexps, one originally could make them dynamical only via /$interpolation/ ...but then, they have to be recompiled every time they are executed. Hence, people "added state to locations in the code" (as they previously did with ".." and such) and provided /o. Of course, this also turned out to be stupid! Think about passing different regexps into a function. So, by now, we *in addition* have qr() and some further quite ugly compiled-regexp-interpolation mechanism. -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)