What's the reason for using instantiated types? #3
-
This came to my attention when updating TwoBit.Record. Should lines like the following take a type as the first argument instead of an instantiated type? For example, should the above line be like the following, or should the following be additionally provided? @inline function encode(::Type{$(A){2}}, nt::$(T)) |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 3 replies
-
In some sense it's arbitrary - with singleton structs, the type and the instance are the same, functionally. However, the Julia style recommendation recommends using instances, so that's what we do, too. Edit: For the same reason, the following is in the docstring of
|
Beta Was this translation helpful? Give feedback.
In some sense it's arbitrary - with singleton structs, the type and the instance are the same, functionally. However, the Julia style recommendation recommends using instances, so that's what we do, too.
Edit: For the same reason, the following is in the docstring of
Alphabet
: