One observer described the solution as “cute but not extensible” (para-phrasing); this comment slipped its way into an initial draft of the final report, which described the Haskell prototype as being “too cute for its own good” (the phrase was later removed after objection by the first author of this paper).
We mention these responses because they must be anticipated in the future. If functional languages are to become more widely used, various sociological and psychological barriers must be overcome. As a community we should be aware of these barriers and realize that they will not disappear overnight.
TL;DR - Haskell mistaken for pseudo-code, a case study on machine-
checked specification for use in standards can't or won't be read
by the people who need it (who aren't the people in this mailing list).
A couple of years ago, while trying to implement a programming language
with >30 years of use and an actual ANSI standard, I encountered a gap
in the standard where an aspect of arithmetic was referred to the
Language Independent Arithmetic standard, which had in fact nothing
whatsoever to say on the topic. In consequence of this gap, existing
implementations of this language implement that feature with different
semantics. Poking around, I found a smaller but similar hole in SQL,
and similar issues in other languages.
There was no existing specification that any of these could refer to.
So I set out to write one. Having seen other problems in standards
caused by definitions that had not been adequately proof-read,
I decided that I wanted a specification that had
- been type-checked
- had been tested reasonably thoroughly
Since I'm writing in this mailing list, you can guess what I thought
was a good way to do this: I wrote the specification in quite direct
Haskell, putting effort into clarity at the expense of efficiency,
and I used QuickCheck to test the specification. I still don't know
whether to be pleased that QuickCheck found mistakes -- demonstrating
my point that specifications need to be checked thoroughly -- or
ashamed that I'm still making such mistakes.
My problem: I can't get this published.
The backhanded compliment: the last reviewer excoriated me
for having too much pseudocode in my paper. (Despite the paper
stating explicitly that ALL code in the paper was real code that
had been executed.) You got it: Haskell doesn't look like a "real"
programming language, but like something written for human
comprehension during design.
The dilemma: what I want to do is to tell people working
on standards that we NEED to have machine-checked specifications
and that we HAVE the technology to write such specifications and
test them (oh and by the way here's this specification I wrote to
fill that gap). But people who read Haskell well enough to read
my specification don't need to be persuaded of this, and in all
honesty, could write the specification for themselves if it
occurred to them. Yet the people who do need to be told that there
is a much better way to write standards than say the ECMAScript way
don't read Haskell, and won't be interested in learning to do so
until they've been persuaded...
So where would _you_ send a case study on machine-checked specification?
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-caf e
Only members subscribed via the mailman list are allowed to post.