I have recently been running into some (nitpicky?) problems with the typesafe builder pattern. It is the problem where functions inside the builder and outside the builder have similar names but different signatures (but it also happens for functions that have similar names) and users are easily tricked into the wrong function. I have been playing with shadowing those functions inside the builder to prevent users from using the wrong functions, but I can't say it is elegant:
https://gist.github.com/edwinRNDR/18bacaf0fc51b44349c748eecbe76dde . What are nicer ways to deal with this problem?