Question: What does "try generics" mean ?

Asked By
Asked At
2017-10-06 21:13:52

Found 15 possible answers.

User Answered At Possible Answer
jslovato 2017-10-06 21:14:11 sounds like innuendo …
dlsniper 2017-10-06 21:14:23 in... C#? Java? PHP?
adamo57 2017-10-06 21:14:33 Lisp
thor4 2017-10-06 21:22:38 you'll have to pm him to find out first generic is free
theckman 2017-10-06 21:24:15 @anlhord I've been meaning to ask, is calling yourself generics some sort of long troll? Or do you happen to use the handle generics everywhere?
rikonor 2017-10-06 21:42:06 Which would you prefer?
type PersonStore interface {
Also, if you try to Get something and it's not found.. would you want `nil` or an explicit `error`?
} Put(p *Person) (id string, err error) Get(id string) (*Person, error) type PersonStore interface { - vs - } Put(p Person) (id string, err error) Get(id string) (Person, error)
dlsniper 2017-10-06 21:43:11 neither are idiomatic interfaces as for pointer vs non-pointer, it depends on what you need to do and if you already have that as a pointer because your methods are all on the pointer or not (for example)
rikonor 2017-10-06 21:44:37 Is there an idiomatic alternative that you're aware of?
lars 2017-10-06 21:45:04 I think you’d at least want it to be GetPerson(), etc.
ingcr3at1on 2017-10-06 21:45:14 I'm guessing not but does anyone know of a date package that can parse months in spanish or am I going to have to write something myself? lol I mean it's not hard but I thought I'd check :smile:
buddhamagnet 2017-10-06 21:45:51 Isn't that just a map with 12 key value pairs?
dlsniper 2017-10-06 21:45:52
type PersonLoader interface {
} PersonStorer PersonLoader type PersonLoadStorer interface { } Store(p *Person) (id string, err error) type PersonStorer interface { } Loader(id string) (*Person, error) // or Person(id string) (*Person, error)
ingcr3at1on 2017-10-06 21:46:25 @buddhamagnet pretty much yeah but I was thinking if someone had written a package it might support more than just spanish and maybe I could avoid this issue in the future
dlsniper 2017-10-06 21:47:48 see: - - -
rikonor 2017-10-06 21:48:10 @dlsniper good point.. til any thoughts on the nil vs ErrNotFound thing?

Related Questions