[Template-haskell] Ramblings on TH names
Alain Cremieux
alcremi@pobox.com
Sun, 19 Jan 2003 23:28:33 +0100
Hi,
I'm beginning to work with TH. I'm sincerely finding the whole thing
extraordinary, using (nearly) plain Haskell to write Haskell macros. I
think this idea will have great echoes on the programming community :
Haskell was already the best language, so now it will be a model for
everyone (I am dreaming).
There is a drawback in the current implementation though : I think the
names of the data and functions are terrible !
First they are way too short. Describing a combined concept in 4 letters
is OK for people who invented them, not for common users. And I don't
see any logic in the spelling : Mat, Match and Mtch, no way to remember
that ! But one is a constructor, the same one is a type, one is a data
type, and the last one is a monad type.
There is also Exp and Expr, dotdotC which should may be spelled
dotDotC,Con Constr Cons, and so on
May be we can now have the opportunity to find a clear rule, involving
prefixing or suffixing and a sufficient number of letters, before
everyone use it and it is impossible to change it.
Maybe functions and data in TH should have some marking symbol
(everything begins with th or TH) so it is easier to see what is
executed at compilation and what is executed at run-time (I know that TH
functions are ordinary functions though).
Well, I've said it. Anyway I still think TH is a big step in a language
that was already far ahead, and its designers deserve standing ovations.
Alain