Create a Dreamwidth Account
Site and Account
Reload page in style:
2013-04-20 06:00 am (UTC)
I think you're missing the point of my complaints. I don't care that you want to capture effects in the type system, I'm all for that. But drawing a distinction between
() -> T
failure of the type system
to properly capture information. This is one of my principal complaints against ML. Arithmetically we have that
x = x^1
. Category theoretically we model elements of
by the morphisms
. Etc, etc, etc. The only times we have
() -> T
is when we have already failed: C-like languages which fail to treat functions as values; Haskell not modeling the equation
undefined = \x. undefined
; everything ML has ever done. If you want to model effects, great! then model effects; but don't break the definition of unit and arrow in order to paper over the fact that you're not actually modeling effects.
Similarly, the whole idea of needing to teach people about lvalues and rvalues indicates a failure of the language to adhere to the way people think naturally. Ask anyone who's had to teach C to undergrads. Haskell gets this right in distinguishing three things: the name of a mutable cell, the operation for reading from that cell, and the operation for writing to that cell. It's fine to complain about the syntactic overhead of how Haskell makes that tripartite distinction, and I'm all for making the distinction lighter weight. But, it is not okay to fail to make the distinctions at all, nor to conflate the cell with the name of the cell. This is one of those things that computer scientists get inured against after taking so long to learn it, but it's one of the huge stumbling blocks for hoi polloi learning how to program— and that difficulty is not because it's inherently hard, it's because our languages make it harder than it needs to be.
Thread from start
This account has disabled anonymous posting.
You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address.
Sign in using OpenID
If you don't have an account you can
create one now
HTML doesn't work in the subject.
Check spelling during preview
This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.
Expand Cut Tags
No cut tags
Page generated Jun. 28th, 2017 05:43 pm
Top of page