
Dj Gilcrease wrote:
I do not expect this idea to gain much traction but it has been an idea rolling around in my head for a year or two, so I decided to write it all down and see what other thought.
Abstract: Python does not currently support static typing of variables, which is something I like, but there are times it would be nice to have static typing for variables, or method/function return values.
I am working on a somewhat different approach to this problem. (For sufficiently large values of 'somwhat different'.) A while back, I came to the conclusion that there was still much to be learned about static typing, and that the existing languages that support static typing were misusing it - that is, in most languages static typing is used to enforce consistency (the advantage of which has been much debated) as opposed to making the language easier and more expressive. Despite my fondness for Python, I realized that I didn't want something that would merely be a layer on top of Python syntax - the decision to incorporate static types would impact so many of the design choices of the language that it would end up being a fundamentally different language. It was only after I discovered the existence of the LLVM project that I realized that I could actually build the language that I had been designing in my head. So I set out to build that language, and along the way I would fix a number of other issues in Python, as well as the many issues I have with Java, C++, C#, D, Ruby, and so on. And also incorporate a few of the ideas which have been suggested on this list and others. In any case, it's two years later and I am still working on the compiler. :) But I am making a lot of progress and it's slowly evolving into something that I think is quite cool. I'm not the first person to attempt this, so if you want to try a language that is statically typed, but inspired by Python, then I suggest checking out Boo or Scala. -- Talin