[Haskell-cafe] I'm afraid of OverloadedLabels.

Ertugrul Söylemez esz at posteo.de
Sun Jul 9 17:36:02 UTC 2017


> I mean yes, it's the same as in most OOP languages, but isn't it also
> bad? There must be a better way...
>
> Is there any alternative approach to name collisions coming?

I think we should start considering what problem we're actually solving
(the "record problem"), and where all solutions inevitably converge
toward when it comes to name resolution: ad-hoc overloading.  In
particular, I think OverloadedLabels is a bad solution, and every other
special-case solution is similarly going to be bad.

My opinion is and has always been: just allow type-directed name
resolution in Haskell.  All naming problems would go away instantly
without any awkward, inconsistent extensions that need new syntax and
heavy type-level machinery to work.  C++ is doing it.  Every OOP
language is doing it.  They do it, because it's useful and convenient.
Let's do it, too!

AND PLEASE not the way an [existing proposal] suggests to do it!  Please
let's just do ad-hoc overloading.  There is no reason to introduce new
syntax, because syntax is completely orthogonal to this problem.

[existing proposal]: https://prime.haskell.org/wiki/TypeDirectedNameResolution


Greets
ertes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170709/52790b27/attachment.sig>


More information about the Haskell-Cafe mailing list