[Cuis-dev] Creating missing messages
Casey Ransberger
bahweep at icloud.com
Fri May 3 08:30:02 PDT 2019
Top post (sorry,) but read the below context first.
It seems a very small external package could provide this to the system browser if all it needed to do was “find unimplemented messages of a particular class and install a convenient stub.”
Like... well cut me some slack here, this is top of my head at breakfast. You’d need to specify which class to add them to, and you’d need to specify class vs. instance side implementation. Your identity can be supplied by the system. I might be missing things in my pre-coffee mental state, so call those out.
A basic generated stub might look like
SomeClassXYZ>>someMethod (params)
self break.
self flag: #toBeImplemented.
self flag: #authorIdentity “or whatever we called that, I forget”
But here’s the thing. I think this is mostly wasted effort unless you’re building something really complex. Here’s how I usually do it, which is a bit cowboy-ish, and somewhat error-prone: I just implement things as I think of them at the highest level I can think of, leaving out lower-level method implementations. Then I run the program, and it crashes, because there’s a method missing. This helpfully opens the debugger, in which I can implement the method I’d forgotten about. I rinse/repeat until the program works.
The beauty of Cuis is that the signal is so much louder than the noise that we can mostly get by without a lot of these features. It isn’t endless wading through classes. It can fit in your head, just barely.
Just my 2 cents. YMMV.
—C
> On Apr 28, 2019, at 3:51 PM, ken.dickey--- via Cuis-dev <cuis-dev at lists.cuis.st> wrote:
>
>> On 2019-04-27 13:42, Phil B via Cuis-dev wrote:
>>
>> It's been a while since I've used Pharo in depth, but are you perhaps thinking of missing classes rather than missing methods?
>
> A quick responses to this.
>
> Basic background:
>
> We are continually working on shrinking the core so that it can fit in a single person's head.
>
> In Cuis 5.0 rev 3717
> Smalltalk allClasses size. --> 540
>
> In Pharo 7.0.1
> Smalltalk allClasses size. --> 7851
>
> The compliment of this is that we have packages which compose and can be understood one at a time. Packages which state their requirements so that they can be "pre-flighted" so that loading a package loads all its code support preconditions.
>
> So a major goal is to evolve Cuis toward something easier to comprehend.
>
> Right now we are in the flux of figuring out how to make packages and salient programming strategies easier to find.
>
> We want to reduce anything which does not carry its own weight. To do more with less. Not to be all things to all people.
>
> This means that one frequently wants to find and load some package to get the "extras" one wants.
>
> The Cuis-Smalltalk/Learning-Cuis repo has a sample package tutorial.
>
> Like many Smalltalk developers, we are all busy as heck and our documentation is not all that it could be.
>
> We very much welcome you to join us to make Cuis better!
>
> If you can't find something in the core and can't find a package which does what you want, please create a package for the benefit of all.
>
> $0.02,
> -KenD
>
> PS: Methods "go away"! As Cuis evolves, I sometimes need grep/search the packages (*.pck.st) for "missing" methods to either find where a method/class has moved to or ask that the method be replaced or made available in a "goodies", "extras" or "compatibility" package.
>
> Note also:
> Feature require: #'CorePackages'.
> Feature require: #'AllPackages'.
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
More information about the Cuis-dev
mailing list