* Duncan Booth:
"Alf P. Steinbach" <al...@start.no> wrote:

I'm not sure I like your idea of introducing static typing to increase
speed, but it could be done without introducing new syntax simply by
defining a special meaning to such annotation expressions that are
'type' invocations, say, then like
   def speed( dist: type( float ), time: type( float ) ) -> type(
float )

That would be particularly useless:

type(float) is type
True

So your declaration is identical to:

  def speed(dist: type, time: type) -> type:

That's the point.


Much better just to stick to something like:

  def speed( dist: float, time: float ) -> float:

where at least you can tell from the annotations what types were actually used.

No, you do not want to redefine the meaning of existing (actually used) 
constructs.

That would be particularly useless, to use your own words. :-)


Cheers & hth.,

- Alf
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to