
5 Dec
2009
5 Dec
'09
5:28 a.m.
Luke Palmer wrote:
On Fri, Dec 4, 2009 at 9:44 AM, Mark Lentczner
wrote: On Dec 4, 2009, at 2:43 AM, Luke Palmer wrote:
So GHC leaves it to the user to specify sharing. If you want an expression shared, let bind it and reuse. Does GHC treat where and let the same in this regard? Or in code, are these treated the same?
where is just sugar for let.
Well, they have different scoping properties because they're in different syntactic classes in the parser (let is an expression whereas where is a modifier on statements), but other than that yes they're the same. -- Live well, ~wren