[squeak-dev] The Inbox: Kernel-mt.1489.mcz
asqueaker at gmail.com
Fri Aug 12 23:18:32 UTC 2022
Just speaking about the constructor, I've long wished to be able to create
MessageSend's with brevity like that. I actually wish the traditional
Smalltalk API would have been *outward-looking*, by having #>> answer a
MessageSend, instead inward-looking and answering a CompiledMethod. What
do *users* of Smalltalk want to ever do with CompiledMethods? Nothing.
But, I actually don't think it's too late. There's no need to give up
availability of #>>> (which I think *is* used by some frameworks -- I could
be wrong) from the namespace. Instead, I think we should simply overload
#>> on Object and not worry about it. If any code actually *needs* to
create a MessageSend to a Behavior (probably a rare thing), they could
still use the wordy constructor we're all still using to this day.
Okay, so there's Integer, too. That's fine. We're just talking about
syntax-sugar here. We'll have to continue to create our MessageSend's to
Integer's the long way, which is what we're still doing, so, no big deal!
See Kernel-cmm.1489. I held off on that sugar to "*append"* arguments
because it might be counterintuitive by the fact the #selector of a
MessageSend is just set once and specifies a fixed number of arguments from
the get go. So, it might be better for usage of the arguments API to match
On Thu, Aug 11, 2022 at 7:29 AM <commits at source.squeak.org> wrote:
> A new version of Kernel was added to project The Inbox:
> ==================== Summary ====================
> Name: Kernel-mt.1489
> Author: mt
> Time: 11 August 2022, 2:28:56.498306 pm
> UUID: 1413f35f-167c-7d45-af5c-198546d08830
> Ancestors: Kernel-eem.1488
> Propose #>>> message to set up message sends.
> (5 >>> #negated) value.
> (5 >>> #raisedTo: >>> 2) value.
> (This is just a brain fart. Feel free to discuss it. Maybe I am on to
> something here. Maybe not.)
> =============== Diff against Kernel-eem.1488 ===============
> Item was added:
> + ----- Method: MessageSend>>>>> (in category 'evaluating') -----
> + >>> arg
> + arguments := arguments copyWith: arg.!
> Item was added:
> + ----- Method: Object>>>>> (in category 'evaluating') -----
> + >>> aSelector
> + "
> + (5 >>> #negated) value.
> + (5 >>> #raisedTo: >>> 2) value.
> + "
> + ^ MessageSend receiver: self selector: aSelector!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev