CanonicalTraits.jl
CanonicalTraits.jl copied to clipboard
maybe rename `@trait` `@ctrait`
trait is used in the "non-canonical trait" sense in many places throughout Julia code and docs.
For that reason only, using a macro name that differs from "@trait" may be helpful to the wider use and easier general understanding of this package, when released. I thought @ctrait (for canonical trait) might work well.
You're mostly right because holy trait has been widespread. However the term "ctrait" sounds a bit weird.
In fact, I womder if "class" or "interface" is accept for you.
@class can refer to typeclass, and "interface" is a term used to represent the same thing in some recent PL contexts(e.g., Idris community)
How about @typeclass, as @class will be misunderstood by many people.
Okay. I'd like to ask some one to perform this change. There're many references of @trait in GG.jl and HigherKindedPolymorphisms.jl.
only those two packages, and this one? (that use @trait)
Yes, and I'm now updating GG.jl. Would you like to contribute to this collection of packages?
sure -- I was going to do a multifile search and replace on each of them and submit those as PRs
Great. Besides, in GG.jl, the only reference is at https://github.com/thautwarm/GG.jl/blob/parametric-type-encoding/src/typeable.jl#L28 .
Oh, there're not too many occurrences of @trait outside this repo, in fact only twice.
I have sent PRs with this change for CanonicalTraits.jl and HigherKindedPolymorphisms.jl.
You should change @trait to @typeclass in GG.jl (I don't know how to PR to a named branch).
(I don't know how to PR to a named branch
When making PR, there is an option to select the base branch. For pr to GG.jl, in default it's thautwarm/master, changing it is okay.
CanonicalTraits.jl just got registered... lol, so there will be a breakage in the next releases. And you should bump up its version..
I don't want to introduce breakage after the release -- maybe forget about the name change.
In fact now no one except me is usinh this, could we ask helps from the community and the managers of JuliaRegistries?
if that is the case, I will redo the PRs with your suggestions