The announcement for CSV.jl v0.7 includes this new capability:
Custom types can now be passed in the …
typeskeyword …, fast parsing is supported for all
AbstractFloattypes; other custom types need to support
parse(T, str)to be parsed correctly.
That a custom numeric type
zero(T) is entirely reasonable and of great utility to clients and other users of that type. With
T a natural (whole) number type,
zero(T) would throw a
DomainError; and imo that is entirely preferable to the “unsupported situation” where users encounter a
For numeric types, there are additional methods that, were their provision best practice, would lift package developers’ ease in assuring more nearly effortless interworking . This need not be a long list. I have found it important to provide custom floating point types with these methods:
For each type-kind (numerics, containers, organizers, symbolics, …) there should be a small set of methods that belong. This would extend Julia’s already epic collaborative reach.