about nextPut: returned argument

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

about nextPut: returned argument

stephane ducasse
hi guys

I saw that nicolas fixed all the add: ... in squeak to return the argument and I like the idea I created an issue.
Now I saw that nicolas fixed also nextPut:

Item was changed:
 ----- Method: DummyStream>>nextPut: (in category 'accessing') -----
 nextPut: aByte
+       "do nothing"
+       ^aByte!
-       "do nothing"!

I checked the ANSI standard and this is unspecified. So I was wondering what the others dialects are doing?
What do we do?

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about nextPut: returned argument

Nicolas Cellier
This is a very minor change, but to me as important as having class
comments, 'at last classified' categories etc...

My rationale is :
1) #nextPut: #nextPutAll: are just like #add: #addAll:
2) that's how they historically behave
3) it's good to have homogeneity in the system

Nicolas

2010/3/20 stephane ducasse <[hidden email]>:

> hi guys
>
> I saw that nicolas fixed all the add: ... in squeak to return the argument and I like the idea I created an issue.
> Now I saw that nicolas fixed also nextPut:
>
> Item was changed:
>  ----- Method: DummyStream>>nextPut: (in category 'accessing') -----
>  nextPut: aByte
> +       "do nothing"
> +       ^aByte!
> -       "do nothing"!
>
> I checked the ANSI standard and this is unspecified. So I was wondering what the others dialects are doing?
> What do we do?
>
> Stef
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about nextPut: returned argument

Dale
In reply to this post by stephane ducasse
FWIW, Gemstone returns the arg..

Dale
----- "stephane ducasse" <[hidden email]> wrote:

| hi guys
|
| I saw that nicolas fixed all the add: ... in squeak to return the
| argument and I like the idea I created an issue.
| Now I saw that nicolas fixed also nextPut:
|
| Item was changed:
|  ----- Method: DummyStream>>nextPut: (in category 'accessing') -----
|  nextPut: aByte
| +       "do nothing"
| +       ^aByte!
| -       "do nothing"!
|
| I checked the ANSI standard and this is unspecified. So I was
| wondering what the others dialects are doing?
| What do we do?
|
| Stef
| _______________________________________________
| Pharo-project mailing list
| [hidden email]
| http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about nextPut: returned argument

Stéphane Ducasse
In reply to this post by Nicolas Cellier

On Mar 20, 2010, at 11:00 PM, Nicolas Cellier wrote:

> This is a very minor change, but to me as important as having class
> comments, 'at last classified' categories etc...

I imagine and for me I spent time looking at your squeak changes just for exactly the same reason.

> My rationale is :
> 1) #nextPut: #nextPutAll: are just like #add: #addAll:
> 2) that's how they historically behave
> 3) it's good to have homogeneity in the system

yes but you did not reply to my question
GS, VA, VW, GNU?
Because before jumping to follow you I  hold down my horses for once :)

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about nextPut: returned argument

Stéphane Ducasse
In reply to this post by Dale
Cool
since I like the idea.
This is really where the ANSI standard shows that there were probably conflict of interest.

> FWIW, Gemstone returns the arg..
>
> Dale
> ----- "stephane ducasse" <[hidden email]> wrote:
>
> | hi guys
> |
> | I saw that nicolas fixed all the add: ... in squeak to return the
> | argument and I like the idea I created an issue.
> | Now I saw that nicolas fixed also nextPut:
> |
> | Item was changed:
> |  ----- Method: DummyStream>>nextPut: (in category 'accessing') -----
> |  nextPut: aByte
> | +       "do nothing"
> | +       ^aByte!
> | -       "do nothing"!
> |
> | I checked the ANSI standard and this is unspecified. So I was
> | wondering what the others dialects are doing?
> | What do we do?
> |
> | Stef
> | _______________________________________________
> | Pharo-project mailing list
> | [hidden email]
> | http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about nextPut: returned argument

Levente Uzonyi-2
In reply to this post by Stéphane Ducasse
On Sat, 20 Mar 2010, Stéphane Ducasse wrote:

>
> On Mar 20, 2010, at 11:00 PM, Nicolas Cellier wrote:
>
>> This is a very minor change, but to me as important as having class
>> comments, 'at last classified' categories etc...
>
> I imagine and for me I spent time looking at your squeak changes just for exactly the same reason.
>
>> My rationale is :
>> 1) #nextPut: #nextPutAll: are just like #add: #addAll:
>> 2) that's how they historically behave
>> 3) it's good to have homogeneity in the system
>
> yes but you did not reply to my question
> GS, VA, VW, GNU?
> Because before jumping to follow you I  hold down my horses for once :)
Even WriteStream >> #nextPut: returns the argument (both primitive and non
primitive version), so these changes give image-wide consistency.


Levente

>
> Stef
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: about nextPut: returned argument

Stéphane Ducasse
Excellent!
I like consistency

Stef

>>> This is a very minor change, but to me as important as having class
>>> comments, 'at last classified' categories etc...
>>
>> I imagine and for me I spent time looking at your squeak changes just for exactly the same reason.
>>
>>> My rationale is :
>>> 1) #nextPut: #nextPutAll: are just like #add: #addAll:
>>> 2) that's how they historically behave
>>> 3) it's good to have homogeneity in the system
>>
>> yes but you did not reply to my question
>> GS, VA, VW, GNU?
>> Because before jumping to follow you I  hold down my horses for once :)
>
> Even WriteStream >> #nextPut: returns the argument (both primitive and non primitive version), so these changes give image-wide consistency.
>
>
> Levente


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project