I'm planning to add a "which methods are defined for subtypes of this type" function to TypeCheck.jl this week. If there's any specific behavior you want it to have, let me know. :)
-- Leah On Tue, Feb 25, 2014 at 2:52 PM, David Moon <[email protected]> wrote: > On Tuesday, February 25, 2014 7:14:37 AM UTC-5, David Moon wrote: >> >> >> The advantage of making it an explicit concept in the language, rather >> than just defining a method that signals an error, is that it can be >> checked at compile time. >> > > In Julia, compile time is load time. Specifically, after evaluating a > top-level expression (which may have loaded a whole lot of files) check > each newly defined datatype or bitstype to see if there are any required > methods that involve that type or its supertypes. If so, check if an > instance of the newly defined type would have all the required methods > applicable to it in the appropriate argument position. >
