<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Aug 28, 2007, at 11:22 AM, Cédrick Béler wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">first, what solution to choose...</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">- proxyobject (Bert's idea + Ramon optimization)</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">I like this solution but maybe not as efficient, thread safe (what peaople mean by that?)</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Excellent hack. Not definitive for me because having to meanings for one token is not really nice.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">- scanner modification (I think Vassili's contribution...)</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">in this case, I like ';;' too...</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>+1 on Vassili's. Not sure about the token. Don't like a lot the ';;' </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>It's a bit confusing with ';'.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What about this ?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">class  Monad m  where</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">     (&gt;&gt;=)            :: m a -&gt; (a -&gt; m b) -&gt; m b</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">     return           :: a -&gt; m a</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>monad &gt;&gt;= doThis &gt;&gt;= doThat &gt;&gt;= doMoreSTuff</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>&gt;&gt;= might be allright ? Big and easy to spot !</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The analogy is that... the function binded to the monad does this ..</DIV><DIV>opens up the monad, then does something  and then returns another 'closed' monad.</DIV><DIV>Guess what encapsulation is on objects.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>We allready got that !!!!!!!!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Example:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>obj myMethodA:x | myMethodB:x</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>A closed object receives a message.</DIV><DIV>The 'myMethodA' method opens up the object as all instance variables are accessible in the method (Just like the monad) and</DIV><DIV>and returns another closed object</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>which again ...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>... receives a message.</DIV><DIV>Now the 'myMethodB' method opens up the object as all instance variables are accessible in the method (Just like the monad).</DIV><DIV>and returns another closed object</DIV><DIV>etc ...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With closed I mean: private instance variables encapsulated.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Well the analogies end there but I think it's still effective.</DIV><DIV>Also trying to lure some Haskell hackers :-).</DIV><DIV>There are quite some Phd powered hackers there, and I personally think that Smalltalk could win their love.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">hope I didn"t miss another way...</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>You miss this (not related): </DIV><DIV>Is it alright to Small-talkers with grey hair to push more on functional programming, where functional programming is intended as chains of functional applications (better if pure) ? Because if the change happens you WILL see more chained applications at least as much you see the cascade. Is this alright with the more experienced guys out there ? and maybe, is this alright at all ?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm +1 in reading more functional applications chains.</DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Cédrick</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Fabio Filasieno</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>