i still don't get how / when julia's types are dependent, but would it be
possible to make enums so that you could have something like:
@enum Fruit APPLE BANANA
function peel_generic(f::Fruit, ...) ...
function eat_apple(::Fruit{APPLE}, ...) ...
function eat_banana(::Fruit{BANANA},...) ...
in other words, some way to get the best of both worlds - both a numeric
value and a (sub-)type that can be dispatched on? i'm thinking that
Fruit{APPLE} is a bit like Array{..., 1} hence my mentioning dependent
types.
i hope that's clear. i suspect i am not using the right words and asking
for the impossible...
andrew