On Thursday, September 3, 2015 at 10:04:22 AM UTC-4, Michael Francis wrote: > > It brings up a question regarding parameterized types, how should (or > should) one access/refer to the parameters of the type rather than an > instance. It seems like a bad (queezy) practice to dig into the parameters > of a type? >
Great question. In general, you should use parameterized functions to access specific parameters for each type (often making use of an abstract supertype's parameters, like Base.keytype). This allows inference to figure out the result and simplify it to a constant at runtime. Plus, type parameters are really only meaningful when you know how the type uses them. The notable exception, of course, are Tuple types themselves, and I agree there's a bit of a hole there.
