[Pharo-dev] Problem with primitive instVarAt: / instVarAt:put:, what should we do ?

Reg Krock rkrock3 at yahoo.ca
Mon Nov 27 15:58:35 EST 2017


Marcus,

I agree with keeping it as Slot. The existing literature (non-Smalltalk) uses Slot in a fairly consistent manner so what would the advantage be of changing it?

Reg

Sent from my iPhone

> On Nov 24, 2017, at 4:44 AM, Clément Bera <bera.clement at gmail.com> wrote:
> 
> In the VM primitiveSlotAt: / at:Put: mean access to any field (pointer or non pointer, sorry for the confusion Marcus earlier on) of an object. The primitive in the image can be named fieldAt:/fieldAt:put: if it makes more sense for Pharo.
> 
> #[0] slotAt: 1 => 0
> #(#a) slotAt: 1 => #a
> 0 at 2 slotAt: 1 => 0
> With Pharo 6 blocks:
> | t | t := #tmp. {[ t ] slotAt: 3 . [ t ] slotAt: 4} => { 0 "numArgs". #tmp } 
> 
> Right now you can do that with instVarAt: on the contrary to what instVarAt: comment states, and this is wrong. 
> 
>> On Fri, Nov 24, 2017 at 10:32 AM, Marcus Denker <marcus.denker at inria.fr> wrote:
>> 
>> 
>>> On 24 Nov 2017, at 00:21, Clément Bera <bera.clement at gmail.com> wrote:
>>> 
>>> 
>>> 
>>> On Fri, Nov 24, 2017 at 12:00 AM, Stephane Ducasse <stepharo.self at gmail.com> wrote:
>>>> Did you talk with marcus?
>>> 
>>> I don't understand the connection between slots and this problem with primitives. 
>>>> 
>> 
>> There is no connection, just the same name.
>> 
>> For Slots aka First Class Instance variables:
>> 
>> I sometimes think that Slot for the first class instance variables might not be a good name, but then,
>> the only alternative would be “instance variable”, but that is not that nice either, as these Slots include
>> virtual variables (that are computed) or variables that are combine stored in a hidden base slot (e.g.
>> used for BooleanSlot or PropertySlot). 
>> 
>> So for now I will keep the Slot term…
>> 
>> 
>> 	Marcus
> 
> 
> 
> -- 
> Clément Béra
> Pharo consortium engineer
> https://clementbera.wordpress.com/
> Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171127/03c3d7bb/attachment-0002.html>


More information about the Pharo-dev mailing list