[squeak-dev] The Inbox: Kernel-cmm.1228.mcz

Jakob Reschke forums.jakob at resfarm.de
Thu May 9 07:36:09 UTC 2019


Moreover, nil isNill (typo) would answer false instead of signalling an
error.

Marcel Taeumel <marcel.taeumel at hpi.de> schrieb am Do., 9. Mai 2019, 08:38:

> Hi Subbu,
>
> here, regular message sends are more flexible than using #isKindOf: (or
> #includesBehavior:). Any class in the hierarchy can choose to answer to
> "is*" messages. That's not that easy with #isKindOf:, which depends on the
> subclass structure, which is hard to "fake" for a specific instance. I
> suppose that overriding #isKindOf: would be possible but troublesome...
>
> Here is more on this topic:
> http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904965.html
> http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904935.html
>
> Best,
> Marcel
>
> Am 08.05.2019 18:10:52 schrieb K K Subbu <kksubbu.ml at gmail.com>:
> This can lead to an explosion in methods. How about catching the pattern
> in DNU and returning true for isObject and false for any selector
> matching 'is[A-Z]*' or the more specific 'is'?
>
> Regards .. Subbu
>
> On 08/05/19 11:27 AM, Marcel Taeumel wrote:
> > +1 for consistency :-)
> >
> > We should add more tests for isNumber, isCollection, isBoolean ... to
> > document the intended use.
> >
> > Best,
> > Marcel
> >>
> >> Am 08.05.2019 01:36:16 schrieb commits at source.squeak.org
> >> :
> >>
> >> Chris Muller uploaded a new version of Kernel to project The Inbox:
> >> http://source.squeak.org/inbox/Kernel-cmm.1228.mcz
> >>
> >> ==================== Summary ====================
> >>
> >> Name: Kernel-cmm.1228
> >> Author: cmm
> >> Time: 7 May 2019, 6:36:01.955169 pm
> >> UUID: 2fad2a41-3aec-4e22-b9e8-cce50f7f6808
> >> Ancestors: Kernel-nice.1227
> >>
> >> Allow identification of instances of Boolean via #isBoolean.
> >>
> >> =============== Diff against Kernel-nice.1227 ===============
> >>
> >> Item was added:
> >> + ----- Method: Boolean>>isBoolean (in category 'testing') -----
> >> + isBoolean
> >> + ^ true!
> >>
> >> Item was added:
> >> + ----- Method: Object>>isBoolean (in category 'testing') -----
> >> + isBoolean
> >> + ^ false!
> >>
> >>
> >
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190509/3b8de2ee/attachment.html>


More information about the Squeak-dev mailing list