Hacker News new | past | comments | ask | show | jobs | submit login

IIRC, they're checked at run-time but not compile-time. And to avoid the speed issue (you're right: it really can get really slow), it only checks the top-level type. E.g. `List<Number>` just checks that it's a list.



> they're checked at run-time but not compile-time

Do they intend to add this? I think it would make a big difference. It would make thje language more like Haskell, where lots of bugs would be caught at compile time.

> it only checks the top-level type. E.g. `List<Number>` just checks that it's a list.

That's fair enough because otherwise it might have to go though potentially very big data structures.

Maybe there could be a command `strict_check(aDataStructure)` which would only get executed when type checking is on and would recurse into a data structure checking everything.


It is used to to teach children. Spoken the name sounds like pirate. No snark intended.


I'm not sure if this was intended as a reply to my comment.

In any case, I would suggest that a language be powerful and simple enough that it can do a wide range of tasks including teaching children, GUI apps, web apps, AI research, scripting, etc. Python does this and Pyret should aspire to do it too.


It totally was. Type checking is being worked on, they were not happy with the performance of their first implementation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: