Python is DOOMED! Again!

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Feb 1 12:09:07 EST 2015


Steven D'Aprano wrote:

> Devin Jeanpierre wrote:
> 
>> It's really only dynamically typed languages that have a single null
>> value of a single type. Maybe I misunderstand the original statement.
> 
> Pascal is statically typed and has a single null pointer compatible with
> all pointer types. 

I'm not having a good night... 

In Pascal, it is spelled *nil*, not null, and it is a keyword.


> C has a single nil pointer compatible with all pointer 
> types.

And in C it is null, which apparently isn't an actual value but a macro.


> I expect that the Modula and Oberon family of languages copied 
> Pascal, which probably copied Algol.

At least I was right about Modula:


The constant NIL is compatible with all pointer types, and designates a
pointer that does not point to any object.  NIL can be assigned to any
pointer type, and any pointer type can be compared to NIL.

http://www.modula2.org/reference/pointertypes.php

Likewise for Oberon and Oberon-2.



-- 
Steven




More information about the Python-list mailing list