[Cuis-dev] smalltalk newbie - Complex
Juan Vuletich
juan at cuis.st
Mon Sep 29 07:12:41 PDT 2025
Hi Jon,
Yes, you're right. If Object needs to be aware of everything it is not,
then it needs to be aware of everything that could possibly exist. Of
course, that doesn't scale. #is: means 'if I don't even have a clue what
you're asking for, then I'm not one of those'! In practical terms it
means to avoid the need of everyone adding stuff to Object.
Cheers,
On 28/09/2025 9:11 AM, Jon Raiford via Cuis-dev wrote:
> I didn't notice anyone else pointing this out... Have a look at how
> many "is" methods are defined on Object in Cuis. Although it is a very
> common pattern in Smalltalk, in Cuis this was changed slightly. Yes,
> there are some common is methods like isString (and isComplex), but
> there is also the #is: method. The idea is to only implement #is: on
> your classes that should answer true. Have a look at implementors and
> senders to understand how it's implemented and used. I believe the
> purpose of this is to help prevent packages from adding methods to
> Object unnecessarily.
>
> Jon
>
> *From: *Cuis-dev <cuis-dev-bounces at lists.cuis.st> on behalf of
> Jonathan Kelly via Cuis-dev <cuis-dev at lists.cuis.st>
> *Date: *Friday, September 26, 2025 at 8:31 PM
> *To: *cuis-dev at lists.cuis.st <cuis-dev at lists.cuis.st>
> *Cc: *Jonathan Kelly <jonkelly at fastmail.fm>
> *Subject: *[Cuis-dev] smalltalk newbie - Complex
>
> Hi,
>
> I'm playing with Cuis smalltalk, and building a Complex class, so far so
> good. But I want to add an "isComplex" method on Object, and
> an "asComplex" method on Number, but I can't find a way to tell Cuis
> that the new methods belongs to the Complex package.How do I make all my
> changes belong to the Specific package they're related to?
>
> Thanks
>
> Jon
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250929/204d5270/attachment.htm>
More information about the Cuis-dev
mailing list