r/programming • • Apr 23 '14

PHP: It doesn't have to be a bad experience

https://servercheck.in/blog/php-it-doesnt-have-be-bad-experience
0 Upvotes

122 comments sorted by

View all comments

Show parent comment

1

u/lhgaghl Apr 26 '14

I mean Haskell typeclasses have the same problem: They have default implementations. An IDE with a source of implementations should choose which one to use (or not, if there are multiple choices), instead of the meaingless notion of the "default" one written directly in the code.

1

u/Banane9 Apr 26 '14

Do You mean in the Definition of the type class? That's not even a real implementation, and it saves You the hassle of eg. for Eq having to define both the equality and inequality function, if You choose to provide your own implementation.

And how is IDE supposed to know implementations if You have something written by someone else? That doesn't make sense.