Functions shouldn't be written for concrete types and instead for abstract types. If you write your function for AbstractMatrix and then make your type <: AbstractMatrix, this will work naturally. Making the type declarations on a function too strict doesn't help performance anyways.
On Saturday, October 29, 2016 at 8:54:04 AM UTC-7, Jérémy Béjanin wrote: > > I know that it is not possible to subtype concrete types, but is it > possible in some other way to create a type that behave exactly like an > existing concrete type (in my case a Matrix) such that it would keep all > the methods associated with it, but would still dispatch when a more > specific (ie specific to that new type) method exists? > > I searched on the mailing list but could not find anything. > > Thanks, > Jeremy >