geo-ant / blog

My public notepad in blog form
https://geo-ant.github.io/blog
MIT License
1 stars 0 forks source link

Comments: Rethinking Builders with Lazy Generics #73

Open geo-ant opened 1 month ago

geo-ant commented 1 month ago

Comments for this article go here and get displayed instantly on the article page as well...

RobJellinghaus commented 1 month ago

Good article, thanks. Regarding a better name for "lazy" vs. "eager", it seems that the compiler is trying to resolve your type to a single specific generic resolution. So maybe "monoresolution" is the default behavior that you don't want? And by extension, the behavior you are trying to achieve might be "polyresolution"? Or else "two-stage resolution" (by analogy with staged programming) or "partial resolution" (by analogy with currying and partial evaluation)?

geo-ant commented 1 month ago

@RobJellinghaus thanks for reading and thinking along. Partial resolution sounds great to me, since I also see that this relates somewhat to currying. Function builders (like the ones in bon), to my mind, mix concepts from currying and named arguments. But I'm not a functional programming guy so I'm probably missing a couple of subtleties.