[squeak-dev] The Trunk: Collections-eem.792.mcz

Chris Muller asqueaker at gmail.com
Thu May 3 19:17:05 UTC 2018


> You really want that elegance for something that is 5 times slower but one
> line shorter?

What I want is for Squeak to be a system that is inviting to both
developers and users, but for that to work, the former have to make
some minor sacrifices to accomodate the latter...

> I did this because I saw Patrick inline isAsciiString in mail
> message processing,

... and so sometimes it's best to leave the in-lining out in the
application(s) that need it.  As Tobias pointed out, the in-image uses
WE have for this method are not performance critical, so if no one can
notice a performance difference, then this change is effectively just
a conversion of code in the class library from something that was
developer AND user consumable, to one that is only developer
consumable.

> and I thought a) his method would read better if it used
> isAsciiString,

This is an argument for readability, but the audience of readers that
will likely encounter this application-specific method is far fewer
than the ones that the core class-library method.

> and b) isAsciiString can be implemented much better without
> affecting clients, so I went ahead.  Part of the beauty of Smalltalk is that
> clients are insulated from implementation so that implementations can be
> improved.  Since when has that not been a part of Smalltalk?

"Insulated from implementation" is part of the beauty of modularity
and object-oriented programming present in many languages.  Smalltalk
is the one that does that but with a simplicity and user-readable
syntax.
_____
We all like performance AND readability (and that's what I thought
your dynamic-inlining would bring us -- the best of both worlds, did
it not happen?).  I'm all for in-lining the REAL workhorse methods (low-level)
that truly get called thousands of times every minute, but for
the others, I ask if you would please consider the Dynabook dream,
where high-school kids are reading methods, assembling behaviors for
their own needs, etc.  They need speed AND readability.  We need both.

 - Chris


More information about the Squeak-dev mailing list