nuprl / retic_performance

Performance evaluation of Reticulated Python
MIT License
3 stars 1 forks source link

oops, retic is not source-to-source #62

Closed bennn closed 7 years ago

bennn commented 7 years ago

Reticulated is not actually a source-to-source translator. Need to change section 2.

It accepts some type annotations that Python would reject, and rejects some annotations that Python would accept.

Here is a valid retic program that Python rejects:

def f(x:Int):
  return x

And here is a valid Python program that retic rejects:

Yolo=1

def f(x:Yolo):
  return x
migeed-z commented 7 years ago

from Michael's paper: "The dialects are syntactically identical to Python 3 but give static and dynamic semantics to the type annotations already present in Python 3. Reticulated Python consists of a typechecker, a source-to-source translator that inserts casts, and Python libraries that implement the casts."

I'm not sure how that captures the two examples above though. So it contains a source to source translator but it's not one itself.

bennn commented 7 years ago

Maybe that was true at the time. It's not true now, only an intuition.