inferred typing

  • Thread starter Gabriel Zachmann
  • Start date
G

Gabriel Zachmann

Just a curious question:

Has it ever been considered to furnish Python with inferred typing?

(Possibly only for certain functions or classes, designated by the programmer?)

Cheers,
Gab.

--
/-------------------------------------------------------------------------\
| There are works which wait, |
| and which one does not understand for a long time; [...] |
| for the question often arrives a terribly long time after the answer. |
| (Oscar Wilde) |
+-------------------------------------------------------------------------+
| (e-mail address removed)-bonn.de __@/' www.gabrielzachmann.org |
\-------------------------------------------------------------------------/
 
V

Ville Vainio

Gabriel> Just a curious question: Has it ever been considered to
Gabriel> furnish Python with inferred typing?

Yes - googling for Starkiller and Boo is a good start.
 
N

Neuruss

Yes, as Ville already mentioned, Starkiller is a static type inference
system along with a c++ compiler for python.
According to its author, it should have been released already, but it
seems we will have to wait until he mangaes to get the time to finish
it.

As for Boo, it is a python-like language for the .NET framework.
It has a very good type inference system, although the language is
statically typed (the difference with traditional statyc typed
languages is that you don't have to declare types everywhere, only in
those few cases where the compiler cannot figure out the types by
itself, but I don't want to talk to much about it because I'm far from
being an expert...).

You should also read about Pypy, which is a very ambitious project
currently in development. They are already working in a type inference
system... http://codespeak.net/moin/pypy/moin.cgi/VilniusSprintTasks

And as far as I know, it seems that something alomg these lines is
planned for Ironpython, but it won't be soon.
 
G

Gabriel Zachmann

Thanks for your responses.

Both Boo and Starkiller sound quite interesting.
Boo seems to have some momentum, but what about Starkiller, once the PhD is
finished?

Also, both are python compilers.
I was hoping for something more like Hotspot for Java, i.e.,
something which compiles parts of the python script that turn out not to be
really dynamic at run-time and that are executed a lot.

Anything along those lines?

In addition, I am not sure that any effort that is not integrated into
mainstream Python will have a real chance to achieve widespread use ...

Best regards,
Gabriel.

--
/-------------------------------------------------------------------------\
| There are works which wait, |
| and which one does not understand for a long time; [...] |
| for the question often arrives a terribly long time after the answer. |
| (Oscar Wilde) |
+-------------------------------------------------------------------------+
| (e-mail address removed)-bonn.de __@/' www.gabrielzachmann.org |
\-------------------------------------------------------------------------/
 
A

Alex Martelli

Gabriel Zachmann said:
Thanks for your responses.

Both Boo and Starkiller sound quite interesting.
Boo seems to have some momentum, but what about Starkiller, once the PhD is
finished?

Also, both are python compilers.

Boo is a different language, pythonlike but not python.
I was hoping for something more like Hotspot for Java, i.e.,
something which compiles parts of the python script that turn out not to be
really dynamic at run-time and that are executed a lot.

Anything along those lines?
psyco?

In addition, I am not sure that any effort that is not integrated into
mainstream Python will have a real chance to achieve widespread use ...

I strongly doubt anything like a JIT will get integrated into mainstream
Python before it's very solid, which probably requires it to get
widespread first.


Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top