r/ProgrammingLanguages • u/marvinborner bruijn, effekt • Apr 27 '26
Discussion Effekt: Name-Based Implicits
https://effekt-lang.org/tour/name-based-implicitsWe recently added name-based implicits to our language. It's based on the work by Daan Leijen and Tim Whiting "Syntactic Implicit Parameters with Static Overloading". Let us know of your thoughts!
29
Upvotes
View all comments
Show parent comment
1
u/_marzipankaiser_ Effekt Apr 29 '26 edited Apr 29 '26
To add to u/marvinborner s comment: If you'd want the
compareonInts to be preferred, you'd need to ensure this some other way. It is resolved the same way as a normal overloaded callcompare(12, 42)would be. Which is: It's ambiguous. But, in the future there might be a way to disambiguate it by marking the generic one as being a default implementation in some way (e.g. using namespacing).