Proposal to remove [Stream|Collection]>>#write:

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

Proposal to remove [Stream|Collection]>>#write:

Sven Van Caekenberghe-2
Hi,

Did you know that both Stream and Collection respond to #write: (as an alias to #<< and #add: respectively) ? I sure did not (and I did quite a bit of stream hacking).

This selector is not used for these 2 receiver types in the standard image (except for one unit test), I never saw it being used in actual code.

These are just aliases that add nothing but cognitive load.

They make the API's of two important hierarchies (and especially the interface for non-inheriting classes) heavier than needed for no functional benefit.

So I propose to remove [Stream|Collection]>>#write:

What say thou ?

Sven


Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

ducasse
+ 1
:)
But I’m an easy person when it is about cleaning.

> On 22 Feb 2019, at 15:39, Sven Van Caekenberghe <[hidden email]> wrote:
>
> Hi,
>
> Did you know that both Stream and Collection respond to #write: (as an alias to #<< and #add: respectively) ? I sure did not (and I did quite a bit of stream hacking).
>
> This selector is not used for these 2 receiver types in the standard image (except for one unit test), I never saw it being used in actual code.
>
> These are just aliases that add nothing but cognitive load.
>
> They make the API's of two important hierarchies (and especially the interface for non-inheriting classes) heavier than needed for no functional benefit.
>
> So I propose to remove [Stream|Collection]>>#write:
>
> What say thou ?
>
> Sven
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Esteban A. Maringolo
El vie., 22 feb. 2019 a las 11:43, ducasse
(<[hidden email]>) escribió:
> + 1
> :)

> But I’m an easy person when it is about cleaning.

+1. That makes us two.

Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

alistairgrant
On Fri, 22 Feb 2019 at 15:50, Esteban Maringolo <[hidden email]> wrote:
>
> El vie., 22 feb. 2019 a las 11:43, ducasse
> (<[hidden email]>) escribió:
> > + 1
> > :)
>
> > But I’m an easy person when it is about cleaning.
>
> +1. That makes us two.

+1

Cheers,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Sven Van Caekenberghe-2
https://github.com/pharo-project/pharo/issues/2701

> On 22 Feb 2019, at 15:57, Alistair Grant <[hidden email]> wrote:
>
> On Fri, 22 Feb 2019 at 15:50, Esteban Maringolo <[hidden email]> wrote:
>>
>> El vie., 22 feb. 2019 a las 11:43, ducasse
>> (<[hidden email]>) escribió:
>>> + 1
>>> :)
>>
>>> But I’m an easy person when it is about cleaning.
>>
>> +1. That makes us two.
>
> +1
>
> Cheers,
> Alistair
>


Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Stephan Eggermont-3
In reply to this post by Sven Van Caekenberghe-2
Sven Van Caekenberghe <[hidden email]> wrote:
.
>
> So I propose to remove [Stream|Collection]>>#write:
>
> What say thou ?

Check the selectors used in the latest packages on squeaksource, ss3,
smalltalkhub and decide.

Stephan





Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Sven Van Caekenberghe-2


> On 22 Feb 2019, at 19:39, Stephan Eggermont <[hidden email]> wrote:
>
> Sven Van Caekenberghe <[hidden email]> wrote:
> .
>>
>> So I propose to remove [Stream|Collection]>>#write:
>>
>> What say thou ?
>
> Check the selectors used in the latest packages on squeaksource, ss3,
> smalltalkhub and decide.
>
> Stephan

You forgot GitHub and all private company repositories in the world.


Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

NorbertHartl


> Am 22.02.2019 um 19:45 schrieb Sven Van Caekenberghe <[hidden email]>:
>
>
>
>> On 22 Feb 2019, at 19:39, Stephan Eggermont <[hidden email]> wrote:
>>
>> Sven Van Caekenberghe <[hidden email]> wrote:
>> .
>>>
>>> So I propose to remove [Stream|Collection]>>#write:
>>>
>>> What say thou ?
>>
>> Check the selectors used in the latest packages on squeaksource, ss3,
>> smalltalkhub and decide.
>>
>> Stephan
>
> You forgot GitHub and all private company repositories in the world.
>
hehe, indeed.

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Pharo Smalltalk Developers mailing list
In reply to this post by Sven Van Caekenberghe-2
Trying to be *somewhat* compatible and verifying (even quickly) that
it's not breaking a gazillion things is the very least someone can
do...  Backward compatibility is NOT a sin! ;)

On 2019-02-22 13:45, Sven Van Caekenberghe wrote:

>
>> On 22 Feb 2019, at 19:39, Stephan Eggermont <[hidden email]> wrote:
>>
>> Sven Van Caekenberghe <[hidden email]> wrote:
>> .
>>> So I propose to remove [Stream|Collection]>>#write:
>>>
>>> What say thou ?
>> Check the selectors used in the latest packages on squeaksource, ss3,
>> smalltalkhub and decide.
>>
>> Stephan
> You forgot GitHub and all private company repositories in the world.
>
>
--
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Sven Van Caekenberghe-2
<intellectual response>

Many system classes contain lots of methods that are confusing, duplicates of similar functionality, bogus, old, unused, untested and undocumented . This makes the system more complex, especially for newcomers, but also for everyone else trying to make changes. This is often technical debt, cleanup that has been postponed.

It is important that knowledgeable developers try to clean up by simplifying things. If not, the situation will never improve.

Of course we have to be careful, in this particular case I was. We have done many hundreds of these removals in the past years, with very little problems. We have also done way more dangerous things, like change signatures and semantics of existing methods.

In my opinion we can safely go ahead and remove this. A couple of others concurred.

If someone wants to go through the trouble to do this with deprecation and a rewrite rule, fine.

<emotional response>

Sure, the responses

"Trying to be *somewhat* compatible and verifying (even quickly) that it's not breaking a gazillion things is the very least someone can do...  Backward compatibility is NOT a sin! ;):"

and

"Check the selectors used in the latest packages on squeaksource, ss3,
smalltalkhub and decide."

are pure technical, intellectual arguments and not passive-aggressive criticism. Right.

> On 22 Feb 2019, at 19:54, Benoit St-Jean via Pharo-dev <[hidden email]> wrote:
>
>
> From: Benoit St-Jean <[hidden email]>
> Subject: Re: [Pharo-dev] Proposal to remove [Stream|Collection]>>#write:
> Date: 22 February 2019 at 19:54:55 GMT+1
> To: Pharo Development List <[hidden email]>
>
>
> Trying to be *somewhat* compatible and verifying (even quickly) that it's not breaking a gazillion things is the very least someone can do...  Backward compatibility is NOT a sin! ;)
>
> On 2019-02-22 13:45, Sven Van Caekenberghe wrote:
>>
>>> On 22 Feb 2019, at 19:39, Stephan Eggermont <[hidden email]> wrote:
>>>
>>> Sven Van Caekenberghe <[hidden email]> wrote:
>>> .
>>>> So I propose to remove [Stream|Collection]>>#write:
>>>>
>>>> What say thou ?
>>> Check the selectors used in the latest packages on squeaksource, ss3,
>>> smalltalkhub and decide.
>>>
>>> Stephan
>> You forgot GitHub and all private company repositories in the world.
>>
>>
> --
> -----------------
> Benoît St-Jean
> Yahoo! Messenger: bstjean
> Twitter: @BenLeChialeux
> Pinterest: benoitstjean
> Instagram: Chef_Benito
> IRC: lamneth
> Blogue: endormitoire.wordpress.com
> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

ducasse
I think that with the automatic rewrite support and the Migrator packages
we can get the best of the world: moving and improving while helping people to migrate.

From that perspective:
        - test suite
        - automatic rewrite
        are a super good insurance for moving applications.

Now I would really like to see how we can improve the automatic migration.

And yes we should really clean the system.
We started with the API of String in the past and this was funny to see all the cruft that accumulated over years.


Stef

> On 22 Feb 2019, at 22:55, Sven Van Caekenberghe <[hidden email]> wrote:
>
> <intellectual response>
>
> Many system classes contain lots of methods that are confusing, duplicates of similar functionality, bogus, old, unused, untested and undocumented . This makes the system more complex, especially for newcomers, but also for everyone else trying to make changes. This is often technical debt, cleanup that has been postponed.
>
> It is important that knowledgeable developers try to clean up by simplifying things. If not, the situation will never improve.
>
> Of course we have to be careful, in this particular case I was. We have done many hundreds of these removals in the past years, with very little problems. We have also done way more dangerous things, like change signatures and semantics of existing methods.
>
> In my opinion we can safely go ahead and remove this. A couple of others concurred.
>
> If someone wants to go through the trouble to do this with deprecation and a rewrite rule, fine.
>
> <emotional response>
>
> Sure, the responses
>
> "Trying to be *somewhat* compatible and verifying (even quickly) that it's not breaking a gazillion things is the very least someone can do...  Backward compatibility is NOT a sin! ;):"
>
> and
>
> "Check the selectors used in the latest packages on squeaksource, ss3,
> smalltalkhub and decide."
>
> are pure technical, intellectual arguments and not passive-aggressive criticism. Right.
>
>> On 22 Feb 2019, at 19:54, Benoit St-Jean via Pharo-dev <[hidden email]> wrote:
>>
>>
>> From: Benoit St-Jean <[hidden email]>
>> Subject: Re: [Pharo-dev] Proposal to remove [Stream|Collection]>>#write:
>> Date: 22 February 2019 at 19:54:55 GMT+1
>> To: Pharo Development List <[hidden email]>
>>
>>
>> Trying to be *somewhat* compatible and verifying (even quickly) that it's not breaking a gazillion things is the very least someone can do...  Backward compatibility is NOT a sin! ;)
>>
>> On 2019-02-22 13:45, Sven Van Caekenberghe wrote:
>>>
>>>> On 22 Feb 2019, at 19:39, Stephan Eggermont <[hidden email]> wrote:
>>>>
>>>> Sven Van Caekenberghe <[hidden email]> wrote:
>>>> .
>>>>> So I propose to remove [Stream|Collection]>>#write:
>>>>>
>>>>> What say thou ?
>>>> Check the selectors used in the latest packages on squeaksource, ss3,
>>>> smalltalkhub and decide.
>>>>
>>>> Stephan
>>> You forgot GitHub and all private company repositories in the world.
>>>
>>>
>> --
>> -----------------
>> Benoît St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>
>>
>>
>>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Proposal to remove [Stream|Collection]>>#write:

Stephan Eggermont-3
In reply to this post by Sven Van Caekenberghe-2
Sven Van Caekenberghe <[hidden email]> wrote:
> <intellectual response>
>
> "Check the selectors used in the latest packages on squeaksource, ss3,
> smalltalkhub and decide."
>
> are pure technical, intellectual arguments and not passive-aggressive criticism. Right.

Yes, it is a very, very serious response. A few years ago I did some
prototypes with DeprecationFinder and MonticelloProjects, applying it to a
subsection of smalltalkhub.
This is essential infrastructure. Both for deprecations and to recover
dependencies. Should be easy to get a paper out of it.

Stephan