You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I've been notificing a pattern in some of my own code (and similarly in postgresql-simple code). There seems to be quite a bit of duplication of functions depending on whether or not query substitution is to be performed. For example, in postgresql-simple we have:
I was just wondering: Do you know if there's any "deep" reason for this? It seems like it would be a straight up win to have separate data constructors, e.g.
(I'm not sure the type signature actually works, but the point is that a parameter list only requires a ToRow class. It could perhaps also be split out to decouple if from ToRow, but that's a side issue.)
This is obviously not a huge deal, but it would be nice to avoid the combinatorial "explosion".
Any ideas?
The text was updated successfully, but these errors were encountered:
So, I've been notificing a pattern in some of my own code (and similarly in postgresql-simple code). There seems to be quite a bit of duplication of functions depending on whether or not query substitution is to be performed. For example, in postgresql-simple we have:
I was just wondering: Do you know if there's any "deep" reason for this? It seems like it would be a straight up win to have separate data constructors, e.g.
(I'm not sure the type signature actually works, but the point is that a parameter list only requires a ToRow class. It could perhaps also be split out to decouple if from ToRow, but that's a side issue.)
This is obviously not a huge deal, but it would be nice to avoid the combinatorial "explosion".
Any ideas?
The text was updated successfully, but these errors were encountered: