brownplt / pyret.org

The site for pyret.org
2 stars 4 forks source link

Language comparison misrepresents Python #15

Open dhouck opened 3 years ago

dhouck commented 3 years ago

In the language comparison section of src/page-template.html, you say that Python does not have type annotations. It does, using similar syntax to pyret in that example:

def square(n : int) -> int:
  return n * n

These arenʼt automatically checked and verified by default, but they can be used by various tools (see PEP484 and PEP526).

Probably a better example should be chosen for this (JavaScript? TypeScript exists but it isnʼt the same thing).

jpolitz commented 3 years ago

Thanks for pointing this out! This might be a more accurate comparison these days:

image