[Types-sig] Request and suggestions for proceeding
Gordon McMillan
gmcm@hypernet.com
Tue, 24 Nov 1998 00:03:09 -0500
Howard Golden makes a plea for explicit goals:
> I want to develop large systems in Python, rather than C/C++ or
> Visual Basic, and I want to be able to reuse my code as well as
> others.
Worthy goal.
> I value the interactive nature of Python's implementation, but is
> this an essential feature of the language?
Yes. (IMO, of course).
> Similarly, being
> interpreted and dynamically typed have caused certain essential
> design decisions. These may conflict with other desirable
> attributes. Specifically, dynamic typing is great for scripting but
> not for programming in the large.
I don't quite buy that. First, I don't think anyone is considering
removing dynamic typing. Some want to add optional static typing (and
that's one of the topics for this SIG), but there's nothing "static"
about the other 2 topics (interfaces and resolving the class / type
divergence).
Second, I know when I started with Python I felt the need for static
typing. For me, at least, I think this was a carryover from 15 years
of working with statically typed languages.
Since then, my development style has changed dramatically. I am now
inclined to "play" with the problem and try many different ways of
factoring it (instead of working out sketches of a few, then picking
one and sticking with it). Ultimately, I arrive at a much cleaner
solution - with much smaller and simpler interdependencies.
At least some of the time, these solutions would be harder to express
if they were statically typed.
> * I want to use generic programming (especially being able to
> incorporate others' generic routines). However, I am unsure how
> this impacts the other features.
You're asking for SPython (Static Python). Generic programming is
already a feature of dynamically typed languages.
I, too, want SPython, but not as a replacement for Python.
> I have stated my goals. I recognize these may not be GvR's goals,
> or the goals of the Python community. If meeting my goals is in
> conflict with some goals you may have, I hope you will specifically
> describe your goals, so that I can try to understand them better.
I use Python in 3 ways. As a prototyping tool (most of my clients
insist on C++ or C), as a system development language, and as a
scripting tool (both Unix style munging stuff, and some Windows
style glue components together stuff). The Unix style munging is
probably it's own category (which I might be willing to sacrifice),
but the others heavily overlap.
I'm interested in seeing Python extend its grip in all those areas.
That means I'm interested in optional static typing if it gets me
increased performance and safety, but not if it excessively limits my
options. Much the same for interfaces - if it helps me express an
abstract solution cleanly and understandably, I'm all for it, but not
if I end up having to work around it. I'm unequivocal about the class
/ type topic - this is a real "gotcha" in Python.
- Gordon