[TYPES] Types of expressions in dynamic languages: "un-typed" or "uni-typed"?

Sean McDirmid smcdirm at microsoft.com
Wed Jan 8 05:09:19 EST 2014

It is difficult to sort any type system into a simple easily named bucket.

I see Python (and Ruby, Javascript) as dynamically and structurally typed. Static structural typing and dynamic nominal typing are completely sensical for other languages (especially the former, the latter is possible even if it lacks examples). 

I reserve "untyped" for languages where you don't even get a decent message-not-understood run-time error (e.g. a memory corruption in C on doing something bad to a void*). Untyped is much weaker than a safe dynamic language that crashes more elegantly (and more easily debugged) when a type error occurs. 

I agree that the concept of uni-typing isn't very useful; it doesn't tell us very much about the real typing properties of the language. 

-----Original Message-----
From: Types-list [mailto:types-list-bounces at lists.seas.upenn.edu] On Behalf Of Siraaj Khandkar
Sent: Wednesday, January 8, 2014 11:12 AM
To: types-list at lists.seas.upenn.edu
Subject: [TYPES] Types of expressions in dynamic languages: "un-typed" or "uni-typed"?

[ The Types Forum, http://lists.seas.upenn.edu/mailman/listinfo/types-list ]

We're having a discussion with a friend regarding the most accurate way to describe the typing situation in Python.

His view is that Python data are typed and variables un-typed, moreover, he proposes that the terms "un-typed" and "uni-typed" are practically equivalent.

At first it seemed somewhat reasonable to me, but the more I thought about it, the more my mind rejected both, the equivalence and the phrasing.

The idea of uni-typing is that there's a set of types that the runtime supports and expressions can be composed of any members of that set, thus forming a single type, which is that set. This idea seems to describe the situation in a useful (for analysis) and an enlightening way, while the term "un-typed" does not seem to say anything useful.

I'm also feeling uneasy about the phrasing: un-typed _variables_. That is, data and _expressions_ have types, but individual variables are just not something you can make a claim about outside of a context of an expression.

We'd appreciate very much if the enlightened folks of this list would provide some input on this.

Siraaj Khandkar
.o.  o.o  ..o  o..  .o.
..o  .oo  o.o  .oo  ..o
ooo  .o.  .oo  oo.  ooo

More information about the Types-list mailing list