4 ms·
>> This is what generics are for in most languages. > That goes exactly opposite of this optimization, and is just entirely orthogonal. What does that mean? Al
by samhw 4y ago
>> This is what generics are for in most languages.
> That goes exactly opposite of this optimization, and is just entirely orthogonal.
What does that mean? Also, how is it "exactly opposite" and "orthogonal"? Maybe let's get rid of the mixed metaphors and speak in concrete terms.
In your comment below ("why would you want the compiler to do that? you can write out all the monomorphizations yourself!") I'm not totally certain that you understand the point of generics. You can always write out each case yourself. Incidentally that also applies to your precious inlining. But it's a tool to make programmers more productive.
- deleted 4y ago[deleted]