Date: 2013-04-20 06:00 am (UTC)
winterkoninkje: shadowcrane (clean) (Default)
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 and () -> T indicates a 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 A by the morphisms hom(1,A). Etc, etc, etc. The only times we have ever distinguished T from () -> 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.
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID 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.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

chooseyourownlogic

April 2013

S M T W T F S
 123456
78910111213
14151617 181920
21222324252627
282930    

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 18th, 2017 06:53 am
Powered by Dreamwidth Studios