[Pharo-dev] [Pharo-fuel] Fuel API bug

Stéphane Ducasse stephane.ducasse at inria.fr
Mon Aug 5 13:01:30 EDT 2013


On Aug 5, 2013, at 4:18 PM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:

> false polymorphism with exception handling?

indeed.

When I read code and I see on:do:  there is a big sign that shows up in my mind: exception. 

In addition when I look inside the senders I get false sense of use.

This is the case for example with on:do: for announcement which I really do not like.
I think that we will rename on:do: into onAnnouncement:do: 
because I did not see one case where suddenly I would like to mix exception with announcement. 

Stef




> 2013/8/5 Mariano Martinez Peck <marianopeck at gmail.com>
> Indeed, I thought the same.
> Stef, could you tell us why implementing on:do: is wrong?
> 
> 
> On Mon, Aug 5, 2013 at 10:30 AM, Martin Dias <tinchodias at gmail.com> wrote:
> Hi
> 
> Thanks Stef for fighting with the leak and thanks Max for the fast response.
> 
> 
> I think was me who added the method #on:do:, and my reasoning was:
> 
> - FileStream has #fileNamed: and #fileNamed:do:
> - PositionableStream has #on:
> - I needed the analog to FileStream>>fileNamed:do: in PositionableStream
> 
> So, I created #on:do:. It looked consistent.
> 
> Martín
> 
> 
> On Sun, Aug 4, 2013 at 5:02 PM, Stéphane Ducasse
> <stephane.ducasse at inria.fr> wrote:
> > impressive :)
> > Tx guys.
> > We are fighting with memory leaks like mad :)
> >
> > Stef
> >
> > On Aug 4, 2013, at 4:49 PM, Max Leske <maxleske at gmail.com> wrote:
> >
> >> Done.
> >>
> >> Name: ConfigurationOfFuel-MaxLeske.207
> >> Author: MaxLeske
> >> Time: 4 August 2013, 4:49:17.037 pm
> >> UUID: 5cc59075-e365-4a58-a20b-22e40b2b70c9
> >> Ancestors: ConfigurationOfFuel-MartinDias.206
> >>
> >> * created new version 1.9.2 for development
> >> * pointed development to 1.9.2
> >> * includes changes Camillo wanted to introduce into 1.9.1 (DateAndTime fix)
> >>
> >>
> >> On 04.08.2013, at 16:35, Max Leske <maxleske at gmail.com> wrote:
> >>
> >>> Yeah, no problem. I'll get on it right away.
> >>>
> >>> Max
> >>>
> >>> On 04.08.2013, at 16:10, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
> >>>
> >>>> Hi guys
> >>>>
> >>>> can you rename this method?
> >>>>
> >>>> on: aCollectionOrStream do: aBlock
> >>>>     "Evaluates a block with a new stream based on the collection or stream. Answers the result of the block evaluation. Follows the style of FileStream>>fileNamed:do:."
> >>>>     | aStream |
> >>>>     aStream := self on: aCollectionOrStream.
> >>>>     [ ^ aBlock value: aStream ] ensure: [ aStream close ]
> >>>>
> >>>>
> >>>> Please do not use on:do: for something that is not about exception (and announcements).
> >>>>
> >>>> It is too confusing and refactor after.
> >>>>
> >>>> Stef
> >>>
> >>
> >>
> >> _______________________________________________
> >> Pharo-fuel mailing list
> >> Pharo-fuel at lists.gforge.inria.fr
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-fuel
> >
> >
> > _______________________________________________
> > Pharo-fuel mailing list
> > Pharo-fuel at lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-fuel
> 
> _______________________________________________
> Pharo-fuel mailing list
> Pharo-fuel at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-fuel
> 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130805/39624082/attachment-0002.html>


More information about the Pharo-dev mailing list