On Monday 06 May 2002 23:28, Hal Daume III wrote: > I wouldn't at all mind making this addition if I had a sense that it would > actually be accepted and that people weren't going to go crazy over the > syntax. Would something like "<-" be preferred or something like "$=>"?
I'd still prefer having some way to automaticly derive 'apply' functions. There is already nice syntax for setting a field value and I always end up defining 'set' functions to each and every field because I want to pass them as arguments. Imagine you have an STRef to a labeled datatype, lets call it "stdata". You want to apply some function "g" to field "foo" of that structure. > modifySTRef (fooAp g) stdata Changing its value to "x" > modifySTRef (fooSet x) stdata With syntatic sugar only you'd have to read the reference, apply the function to the field and then update it. IMO, 'set field' and 'apply to field' functions are as usefull as the 'field projection' functions that are derived from the definition of the labeled datatype. Anyway I agree that it would be nice to have special syntax for updates. I'll use it if I have it available. On Monday 06 May 2002 23:42, David Feuer wrote: > Why not $= ? Yeap very nice in deed. I'd vote for this one. J.A. _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell