[Pharo-dev] nil inspect

Guillermo Polito guillermopolito at gmail.com
Thu Nov 23 05:22:50 EST 2017


Hi Dimitris,

nil **is** an object. A normal object.

>From your wikipedia quote: The true, false, and nil pseudo-variables are
*singleton* <https://en.wikipedia.org/wiki/Singleton_pattern>* instances*.

You can try many things to try to convince yourself:

  - nil class => UndefinedObject
  - nil sizeInMemory => 8 (2 object headers, no instance variables)

You can also take a look at the bootstrap and see how it is created.

And it may make sense to have the same inspection tabs as any other normal
object that has no instance variables.

On Thu, Nov 23, 2017 at 11:14 AM, Dimitris Chloupis <kilon.alios at gmail.com>
wrote:

> looks like wikipedia agrees with me, but I have to confess never looked at
> the Pharo implementation so I may still be wrong
>
> "*Smalltalk-80* syntax is rather minimalist, based on only a handful of
> declarations and reserved words. In fact, only six "keywords" are reserved
> in Smalltalk: true, false, nil, self, super, and thisContext. These are
> actually called *pseudo-variables*, identifiers that follow the rules for
> variable identifiers but denote bindings that the programmer cannot change.
> The true, false, and nil pseudo-variables are singleton
> <https://en.wikipedia.org/wiki/Singleton_pattern> instances. self and
> super refer to the receiver of a message within a method activated in
> response to that message, but sends to super are looked up in the
> superclass of the method's defining class rather than the class of the
> receiver, which allows methods in subclasses to invoke methods of the same
> name in superclasses. thisContext refers to the current activation
> record. The only built-in language constructs are message sends,
> assignment, method return and literal syntax for some objects. From its
> origins as a language for children of all ages, standard Smalltalk syntax
> uses punctuation in a manner more like English than mainstream coding
> languages. The remainder of the language, including control structures for
> conditional evaluation and iteration, is implemented on top of the built-in
> constructs by the standard Smalltalk class library. (For performance
> reasons, implementations may recognize and treat as special some of those
> messages; however, this is only an optimization and is not hardwired into
> the language syntax.)"
>
> https://en.wikipedia.org/wiki/Smalltalk
>
> Or maybe there is more here tha meets the eye ?
>
> On Thu, Nov 23, 2017 at 12:10 PM Dimitris Chloupis <kilon.alios at gmail.com>
> wrote:
>
>> is it ? I always thought it was just one of those things that is not an
>> object , together with super and self. I vaguelly remember that 5-6 words
>> in Smalltalk are not objects.
>>
>> If it is an actual object and not something else wrapped in a very thin
>> object, I can see the reason for inspection. Otherwise I cannot say I see
>> it.
>>
>> On Thu, Nov 23, 2017 at 10:45 AM Denis Kudriashov <dionisiydk at gmail.com>
>> wrote:
>>
>>> But it is not nothing. It is real object.
>>>
>>> 2017-11-23 9:03 GMT+01:00 Dimitris Chloupis <kilon.alios at gmail.com>:
>>>
>>>> Personally I love it
>>>>
>>>>  what you find when you search for nothing ?
>>>>
>>>> Nothing
>>>>
>>>> :D
>>>>
>>>> On Wed, Nov 22, 2017 at 10:23 PM Stephane Ducasse <
>>>> stepharo.self at gmail.com> wrote:
>>>>
>>>>> Indeed I do not really like the blank window.
>>>>>
>>>>> On Sat, Nov 18, 2017 at 10:18 PM, Nicolas Cellier <
>>>>> nicolas.cellier.aka.nice at gmail.com> wrote:
>>>>>
>>>>>> Ah OK, it's expected then?
>>>>>> I find that surprising, because I could maybe want to look at meta
>>>>>> side like I can for other elementary objects:
>>>>>>
>>>>>> [image: Images intégrées 1]
>>>>>>
>>>>>> 2017-11-18 22:03 GMT+01:00 Aliaksei Syrel <alex.syrel at gmail.com>:
>>>>>>
>>>>>>> Yes
>>>>>>>
>>>>>>> [image: Inline images 1]
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Alex
>>>>>>>
>>>>>>> On 18 November 2017 at 21:56, Nicolas Cellier <
>>>>>>> nicolas.cellier.aka.nice at gmail.com> wrote:
>>>>>>>
>>>>>>>> Anyone tried 'nil inspect' recently?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
<http://www.cnrs.fr>*


*Web:* *http://guillep.github.io* <http://guillep.github.io>

*Phone: *+33 06 52 70 66 13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171123/e3b4b471/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d?e?cran 2017-11-18 a? 22.16.47.png
Type: image/png
Size: 172529 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171123/e3b4b471/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-11-18 at 22.03.22.png
Type: image/png
Size: 24843 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171123/e3b4b471/attachment-0001.png>


More information about the Pharo-dev mailing list