From: Daan L. <daa...@xs...> - 2004-06-27 09:35:16
|
On Sat, 26 Jun 2004 22:17:33 +0200, Vincenzo aka Nick Name <vincenzo_mlRE= .MO...@ya...> wrote: > On Friday 25 June 2004 11:40, Daan Leijen wrote: >> downside of "creation" attributes is that it creates a distinction >> between: >> >> =A0 =A0 w <- widget [...] >> >> and >> >> =A0 =A0 w <- widget [] >> =A0 =A0 set w [...] > > Why is it a problem? It should be obvious to an user that a property > could have an initialization value with a default setting. If you are > in the IO monad it should be clear enough that the second form first > creates the widget using default settings and then sets the properties; Thanks Vincenzo and Claus for your feedback, I guess that I was trying to satisfy too many laws, and maybe creation attributes are indeed a natural thing. I was already (planning on) supporting creation attributes, as I failed to come up with a nicer solution. Now that it seems that this is even a "natural" extension, it makes me feel much more confident about it. I like the model of "defaultAttrs ++ creationAttrs" of Claus, this explains it nicely. Thanks, Daan. > the only alternative I see would be an (infamous) GUI monad which > people seem to dislike: even if you could hide the widget and show it > on demand, there might be other things unrelated to graphics that > behave differently if done during initialization or after, do you > agree? Yes, let's stay away from a GUI monad :-) > > Vincenzo > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |