Naming  

Syntax schemes for variable bindings

verbose, but accurate

let var  x = ...
let val  x = ...
let lazy x = ...

Problem: people who have used var in other languages will type var by mistake when they mean let. I know this because I make this mistake all the time. If it weren't for that, I'd be all for.

var  x = ...
let  x = ...
lazy x = ...

To discourage this, we could go with:

let var x = ...
lazy    x = ...
let     x = ...

Or

let mutable x = ...
lazy        x = ...
let         x = ...

I don't love let mutable. It smacks of F# verbosity disease. Though I may just hate it because of the awkward duality between let mutable x = ... and let x = ref ... in F#.

Comments powered by Disqus