On 03/06/2016 05:30 PM, fr33domlover wrote: > On Tue, 1 Mar 2016 16:27:41 -0800 > Bryan Richter <[email protected]> wrote: > >> ** Tech action items >> >> - UserHandle should be redefined to Text >> - The existing route should be renamed getUserByIdR and should use >> UserId instead of UserHandle >> - The new route should get the original name UserR > > One thing I noticed when I started working on the code is that UserHandle is > confusing. I checked what that type is used for. And it's used exactly for one > thing: The type of the path piece in the routes file. Since the auth ID is > still the user ID (as it should be), I think UserHandle is just confusing and > we can safely remove that type. > > Instead we can use Text directly. > > Since changing from UserId to Text in the /u/<user> route also requires > changes > in handlers and the DB queries they run, moving between types back and forth > isn't trivial anyway, I don't see a particular reason to use a type alias if > we > do use plain Text for other things in the code. If you want to define a > newtype > that wraps Text, that's a different story and a separate discussion. > > For now I'm leaving UserHandle as-is in the code, waiting for your thoughts. > It's not a critical thing, just wanted to share what I feel about it (but as a > beginner Yesod user I may be wrong). > > --fr33 >
I can't speak to the code and type details but the term "handle" is terribly confusing, nobody gets what it is easily, and I support all efforts to remove it from our code (but not saying they are necessarily priority). We should use less confusing terms.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Dev mailing list [email protected] https://lists.snowdrift.coop/mailman/listinfo/dev
