Python was designed (was Re: Multi-threading in Python vs Java)

Chris Angelico rosuav at gmail.com
Fri Oct 18 00:12:36 EDT 2013


On Fri, Oct 18, 2013 at 2:14 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> One thing he missed is that there are untyped languages where everything
> is the same type. If everything is the same type, that's equivalent to
> there being no types at all. Examples include TCL and Hypertalk, where
> everything are strings, and Forth, where everything are two-byte words.
>
> But I digress. Apart from those couple of little criticisms, I think it
> is a very useful article to read.

Continuing the digression slightly: If everything's a string, how do
you handle aggregate types like arrays? Are they outside the type
system altogether (like in C, where an array-of-int isn't something
you can pass around, though pointer-to-int is)? The only language I've
worked with that has "everything is strings" is REXX, and it does some
fancy footwork with variable names to do mappings, with a general
convention around the use of stem.0 to create ersatz arrays (probably
how JavaScript got the idea).

ChrisA



More information about the Python-list mailing list