[Python-ideas] [Wild Idea] Static Ducks

Mike Meyer mwm-keyword-python.b4bdba at mired.org
Sat Sep 26 01:07:59 CEST 2009

On Fri, 25 Sep 2009 13:44:00 +0900
"Stephen J. Turnbull" <stephen at xemacs.org> wrote:

> Mike Meyer writes:
>  > On Thu, 24 Sep 2009 20:06:22 -0400
>  > Gerald Britton <gerald.britton at gmail.com> wrote:
>  > 
>  > > I think that the idea that there is a continuum from weak typing to
>  > > strong typing is useful.
>  > 
>  > I think it's fundamentally broken, at least as badly as the notion of
>  > a political spectrum from liberal to conservative. The problem with
>  > both of those is that there's more than one axis involved.
> The notion that you can't order multidimensional sets (where each
> dimension is ordered) is simply wrong.  You do it every day when you
> decide to have "a Big Mac with coffee" instead of "a QuarterPounder
> with a vanilla shake".

The idea that ordering multidimensional sets matters is simply
wrong. Obviously, you can impose an order - and probably many - on any
countable set - or any space with a countable number of axis.

That leaves three problems, in increasing order of pain:

1) It's not clear the resulting object can be described as a continuum.
2) It's not clear that any of the orders are meaningful.
3) Unless everyone agrees on the order, it's still useless.

#3 is the critical one. You've basically moved the problem from
selecting one from a set of axis to selecting one from a set of
possible orders of a set of axis. Which starts with selecting the set
of meaningful axis from the power set - which is noticeably larger
than set of axis.  The number of meaningful orderings may well
approach the power set in size.

> The question here then is simply "what is the quality of the
> approximation, and are there structural shifts to account for?"

*After* you've agreed on which axis matter, and that the PCA is the
 ordering you want to use. 

>  > Just as people can have a liberal position on one issue while
>  > having a conservative position on another, languages can have some
>  > features that give them "weak typing" and others that give them
>  > "strong typing".
> They can take such positions, but historically the correlations were
> generally high.  What has happened in politics in many countries is
> that there has been a structural realignment such that the component
> axis traditionally labeled "liberal to conservative" is no longer so
> much stronger than other components of variation.  That doesn't mean
> that the traditional axis was never useful, nor that a new principal
> axis hasn't been established (although I don't think it has been
> established yet in American politics).

I've seen people using two political axis for the last couple of
decades: financially conservative/liberal and personally
conservative/liberal. You can of course collapse that to one axis.
You can also describe the solar system with epicycles. But using two
axes - or ellipses - is a more powerful model to work with.

Which is the point - until we can agree

>  > Axis so far: declarations: yes/no/optional. Variables have types:
>  > (yes/no/optional). Implicit conversion: yes/no, with a different
>  > answer possible for every operand and tuple of operators types in the
>  > language.
> My personal resolution of strong vs. weak typing is that it's useful
> to help explain which languages I like (strongly typed ones) vs. those
> I don't.

This, of course, tells me pretty nearly *nothing* about which
languages you like.

> In this, only the implicit conversion axis matters much.

I suspect you care about more than that - or do you weigh Python
converting everything to a bool in a boolean context as equivalent to
some language that will convert everything to a string if there's a
string in the expression?

Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

More information about the Python-ideas mailing list