How to "wow" someone new to Python

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Jan 22 05:51:13 CET 2015


Alan Bawden wrote:

> Alan Bawden <alan at scooby-doo.csail.mit.edu> writes:
>> ...  Score one for untyped languages.
> 
> Drat.  I should have writted "dynamically typed languages".
> 
> The language has changed.  When I was a novice Lisp hacker, we were
> comfortable saying that Lisp was "untyped".  But nowadays we always say
> that Lisp is "dynamically typed".  I could write an essay about why...

I've always understood that strictly speaking, "untyped" refers to low-level 
languages like assembly or Forth, where everything is a machine word.

In Forth, for example, all commands operate on single words on the stack, 
except for "double" variants which operate on two words at a time. E.g. you 
might have FOO to operate on the word at the top of the stack and FOOD to 
operate on the top two words. (Actually, given Forth's reputation for 
cryptic single-character line noise, it would probably be '^ and ''^ or 
something :-) In any case, there's a single stack, and double quantities 
aren't a separate data type, they're just two words.

(Some versions of Forth are arguably typed, in that they have a separate 
stack for floating point.)

I sometimes also use "untyped" to refer to languages like Hypertalk where 
everything is a string.



-- 
Steve




More information about the Python-list mailing list