Flying With Python (Strong versus Weak Typing)

Andy Salnikov a_salnikov at yahoo.com
Wed Mar 12 20:56:31 CET 2003


"Jp Calderone" <exarkun at intarweb.us> wrote in message
news:mailman.1047491900.31675.python-list at python.org...
> On Wed, Mar 12, 2003 at 09:39:13AM -0800, Andy Salnikov wrote:
> >
> > "Matt Gerrans" <mgerrans at mindspring.com> wrote in message
> > news:b4jtai$nv8$1 at slb9.atl.mindspring.net...
> > > Yes, as long as it wasn't pythonw.exe.
> > >
> > > Funny thing is, most of us have flown many times and absolutely no
clue
> > > what software might be involved (if any) in controling various aspects
> > > of the plane and ground control.
> > >
> > > It is also interesting that very advanced nuclear submarines are run
> > > largely on good old-fashioned mechanical technology.  They don't want
> > > the whole thing dependent on computers, because it is too risky.
> > >
> >   Interesting I find this mechanical design closer to C++ static type
> > checking than to Python dynamic type checking (I do not like weak/strong
> > type, IMHO Python is strongly typed language, but it is dynamical).
Every
> > mechanical thing has kind of "interface" and can be joined with only
those
> > mechanical things which respect this "interface" (square peg vs. round
> > hole). Joining typically happens during the submarine assembly, much
like
> > compiling C++ program. This is one of the reason why mission-critical
> > systems prefer to use statically typed languages, you can "join" all
parts
> > together early during "asembly" (but it still does not guarantee it will
> > work correctly, it's not a complete test of the system, like with the
> > submarine you have to test every single part ans all parts together).
> >
>
>   Can you "cast" a square peg to a round one, though? ;)  I think a better
> analogy might be made with ML or another strongly, statically typed
language
> (C++ being a weakly, statically typed one).
>

  Sure, you can make square peg round if you have a file around :) And
sometimes
it could be the only option if you realy have to have a round peg. C++ cast
gives
you this file, but it's your responsibility to use it correctly. I do
program in C++
and I cannot say when I needed cast last time, good design eliminates its
need.
But even in submarines you cannot always expect the design is perfect :)

  Andy.






More information about the Python-list mailing list