Records in Haskell
AntC
anthony_clayden at clear.net.nz
Fri Mar 2 09:09:41 CET 2012
Isaac Dupree <ml <at> isaac.cedarswampstudios.org> writes:
...
> > So under your proposal, a malicious client could guess at the fieldnames in
> > your abstraction, then create their own record with those fieldnames as
> > SharedFields, and then be able to update your precious hidden record type.
>
> Show me how a malicious client could do that. Under DORF plus my
> mini-proposal,
>
> module Abstraction (AbstractData) where
>...
> fieldLabel field1 --however it goes
> [code]
Isaac here's a suggestion: please write up your proposal on a wiki.
Don't expect that your readers will have bothered to read any of your posts,
not even those a few back in the thread.
Don't expect they'll have read the DORF proposal, or the SORF, or TDNR, nor
even the front page of the Records wiki.
Don't expect anybody will believe your claims unless you produce a prototype
showing how you translate your code into legal Haskell.
Don't expect anybody will believe your prototype unless it has meaningful
field names and is illustrating a realistic business application.
Once people look at your code or wiki, don't expect they'll get your syntax
right: you'll have to explain that from scratch.
Don't expect they'll even bother to get this right:
> fieldLabel field1 --however it goes
Don't expect they'll understand the difference between a polymorphic record
system vs. the narrow namespacing issue - in fact expect them to make all
sorts of suggestions for polymorphic record systems.
Don't expect they'll try running the prototype code you laboured so hard to
get working.
Do expect to get a heap of requests for clarifications, which you also put up
on to the wiki so that it grows and grows -- even to explain things which you
thought were pretty obvious.
Do expect to explain the standard Haskell behaviour that you have not changed.
It's not enough to say "This follows standard Haskell behaviour." Do expect to
find your wiki page growing and growing.
Do expect to get a load of posts starting "I haven't followed everything, ..."
or "It's a while since I 'tuned out' of the Records thread, ..." and wanting
you to explain all the bits they could read for themselves on the wiki.
Then expect they'll pick a few words out of your summary and lambast you for
it, even though you politely requested they read the wiki to get the full
story (and which they clearly did not do).
Throughout all this do expect to remain patient, civil and polite.
Do not expect to have a social life or get much sleep. Do expect your wife to
ask who you're writing to, and why.
AntC
More information about the Glasgow-haskell-users
mailing list