4 ms·
What do you mean "document the types". They're type parameters... can you suggest better names for the parameters in StrongSyntax?
by runT1ME 10y ago
What do you mean "document the types". They're type parameters... can you suggest better names for the parameters in StrongSyntax?
- imh 10y agoAs a small example, let's say I have a typed "agg" function with associated typeclass: class typedAgg t where agg :: t f r a b -> (r a -> b) -> f (r a) -> f b ... To lots of people, that's going to be really confusing. It might be easier if I document that f is supposed to be the type of the table, r is the type of the row, and a is the type of elements in the rows, if that's the intended usage.
- runT1ME 10y agoBut I'm saying, if you have a Higher Kinded Type like Strong, what do you name the variables? They don't refer to actual nouns. We're abstracted from that level.
- imh 10y agoIn my example, t, f and r are HKTs. Does that clear up what I mean at all? Strictly speaking in my example, f (r a) is the type of the table, but it's still illustrative to say that f is the type of the table, or say that it's probably a functor or at least similar to one. Specifically with Strong, I'm not sure what I'd comment, as I'm not that comfortable in Scala yet and don't know what Strong is. I'm not going to go digging around and there are basically no comments in that file, which is the problem I'm talking about.