Conversation

what if the syntax for fixed-size array types were just 43<Int>, 68<Bool> and so on, and 43 and 68 themselves at the type level were simply functors [context: hypothetical mainstream-syntaxed Haskell/ML family language]
  • I love it
    20.7%
  • I hate it
    13.8%
  • thanks, I hate it
    65.5%
29 votesFinal results
1
1
yeah typical twitter problem where you can't reasonably include _all_ of the context :) the hypothetical language would be trying to avoid type-level constants, DataKinds, dependent types, that kind of thing, more of the SML/H98 level but it does want fixed size arrays
1
yeah that's a good question I was thinking the numbers would 'desugar' to One/TimesTwo/TimesTwoPlusOne functors or such (so it's logarithmic and big arrays don't destroy compile times) when the type is fully known it could know how to 'do arithmetic' not sure, when polymorphic
2
Show replies