First class labels
claus.reinke at talk21.com
Thu Feb 9 20:46:56 EST 2006
(does replying to my own message constitute a discussion?-)
I would have hoped for someone to say any of the following:
- no need for that, Haskell' is going to have proper records
- Haskell' is going to avoid the records discussion, but I still
don't like your idea, because..
- perhaps that idea isn't entirely wrong, let's see..
but, of course, I realise now that I made a fundamental mistake.
The established procedure to generate discussion about language
design issues is to propose either syntactic sugar or complex type
system extensions, and my proposal was careful to do neither:-(
To make up for this, I've now extended the example code to
include more operations, cryptic infix operators, and more
type class tricks (we have examples of record field selection,
symmetric record concatenation, record field removal, record
field update, record field renaming). Will that be sufficient to
encourage one or two responses, even though the proposal
is still the same?
If nothing else, you might want to look through the code for
usage patterns and usage issues wrt type classes/instances
and various "extensions". How much of that will Haskell'
be able to handle? Will it remove the need for workarounds?
Having first-class labels would also simplify and make more
useable things like the HList effort, which plays similar tricks,
and the particular record system variation we get with the
attached code is not unlike the one presented at last year's
TFP by Daan. So here are two more related links:
Extensible records with scoped labels. (draft)
Strongly typed heterogeneous collections
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4225 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-prime/attachments/20060210/a8120fae/Records.obj
More information about the Haskell-prime