Arc Forumnew | comments | leaders | submitlogin
1 point by Pauan 5114 days ago | link | parent

To put it another way...

Coercion means you only need to define coercion rules in one spot, and existing code can Just Work.

Methods mean you only need to define a method that implements the functionality, and existing code can Just Work.

---

Prototypes get rid of the traditional concept of type entirely. Rather than saying "that's an input stream" or "that's an object of type input" we instead say "that's a function that inherits from stdin."

Of course, I don't plan to get rid of types, since I think they're useful (especially with coercion), but at the same time, I think having more fine-grained control can be useful, so I think there's some synergy between types and prototypes.