3 ms·
Is magic worth anything if it doesn’t work on 100% of its surface? Isn’t “use magic, except in cases where the magical internals don’t apply—then be explicit”
by erikpukinskis 9y ago
Is magic worth anything if it doesn’t work on 100% of its surface?
Isn’t “use magic, except in cases where the magical internals don’t apply—then be explicit” a strictly worse API than “just be explicit”?
- dmytrish 9y agoReturn type polymorphism has usecases where it is irreplaceable (see other comment threads). I am just pointing out an example of bad use, which is not a problem of the language, just of this specific API. As for APIs in general, sometimes they do need some leeway for future extension.