[{"data":1,"prerenderedAt":173},["ShallowReactive",2],{"project-11397905":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":33,"aspects":34,"strip":36,"post_text":29,"what":38,"said":63,"maker_in_thread":106,"shape":112,"grid":117,"attempts":137,"same_week":138,"maker_shows":33,"maker_hidden":166,"reader_version":167,"card":168},"11397905","Interfacer","suggest interface types in Go","title","Show HN: Interfacer – suggest interface types in Go","https:\u002F\u002Fgithub.com\u002Fmvdan\u002Finterfacer","github.com","mvdan",1459438385,2016,66,9,576,2264,26,"notable","dev_tools","linter","cli",[24,25,26,27],"go linter","interface types","golang","static analysis","quiet",null,{"positive":31,"neutral":32,"mixed":32,"critical":31},0,1,2,{"idea":35},{"positive":31,"critical":31},[37,31,31,31,31,31,31,31,37],3,{"problem":39,"audience":51,"pricing":29,"motivation":29,"time_to_build":29,"stack":56,"openness":61,"stage":62,"team_size":62},{"value":40,"source":41,"evidence":42},"Function parameters declared with overly specific concrete types instead of generic interfaces.","commenter",[43,47],{"id":44,"by":45,"text":46},"11402201","rickhanlonii","Really neat package here. Don't let me take away from the work that's been done here (and correct me if I'm wrong) but I think this assumes that the most generic type is the best…",{"id":48,"by":49,"text":50},"11402284","jerf","\"I think this assumes that the most generic type is the best option? Personally, I don't think that's a correct assumption.\" Well, of course it isn't universally. But it's…",{"value":52,"source":53,"evidence":54},"Go developers","inferred",[55],{"id":48,"by":49,"text":50},[57],{"value":58,"source":53,"evidence":59},"Go",[60],{"id":44,"by":45,"text":46},"open_source","unknown",{"praise":64,"objections":69,"requests":82,"questions":90,"alternatives":101},[65],{"value":66,"source":41,"evidence":67},"Useful for scanning code to spot overly specific types",[68],{"id":48,"by":49,"text":50},[70,74],{"value":71,"source":41,"evidence":72},"Assumes the most generic type is always best",[73],{"id":44,"by":45,"text":46},{"value":75,"source":41,"evidence":76},"Could be misused as a git hook enforcement",[77,78],{"id":44,"by":45,"text":46},{"id":79,"by":80,"text":81},"11402233","Goopplesoft","> But I would worry that someone would add this to, say, a git hook as way to enforce this assumption. You shouldn't. At that point there are so many more concerns I'd have with…",[83],{"value":84,"source":85,"evidence":86},"Ideas or false positive examples to keep it conservative","maker",[87],{"id":88,"by":11,"text":89},"11403428","To add to what jerf already said - This is a linter, so it should be taken with a grain of salt. Having said that though, I'm trying really hard to make it conservative and not…",[91],{"value":92,"source":41,"evidence":93},"Whether interface use has runtime cost versus concrete types",[94,98],{"id":95,"by":96,"text":97},"11402350","sudhirj","> One generic reason to use a specific type (heh) is to avoid resolving the interface on every use. Aren't Go interface checked at compile time? I thought only interface casting…",{"id":99,"by":49,"text":100},"11404437","Checking that a value put into an interface type conforms to the interface type is done at compile time, so modulo issues with \"nil\" you can't have an interface type where the…",[102],{"value":103,"source":41,"evidence":104},"gometalinter",[105],{"id":48,"by":49,"text":50},{"comments":33,"answered":32,"key":107},[108,111],{"id":109,"text":110},"11403435","This might be relevant: https:\u002F\u002Fgithub.com\u002Fmvdan\u002Finterfacer\u002Fissues\u002F19 And thanks for the link! That should be useful to make a decision on what to do in that issue.",{"id":88,"text":89},{"commenters":113,"max_depth":114,"maker_replies":33,"first_comment_mins":115,"lifespan_hours":116},7,5,673,21,[118,120,122,123,124,127,129,131,133],[44,31,37,119,45,31],"project\u002Fmixed\u002Fidea",[79,31,31,121,80,31],"commenter\u002Fneutral\u002Fnone",[48,31,31,121,49,31],[95,31,31,121,96,31],[125,31,31,121,126,31],"11402898","brandonbloom",[109,31,31,128,11,32],"maker\u002Fpositive\u002Fnone",[99,31,31,130,49,31],"commenter\u002Fneutral\u002Fperformance",[88,31,31,132,11,32],"maker\u002Fneutral\u002Fexecution",[134,32,37,135,136,31],"11402229","project\u002Fneutral\u002Fidea","haberman",[],[139,144,148,153,158,162],{"id":140,"name":141,"points":142,"category":143},"11407536","webkay",553,"security_privacy",{"id":145,"name":146,"points":147,"category":20},"11439879","Popper.js",169,{"id":149,"name":150,"points":151,"category":152},"11403930","Triangul-Art",138,"creative",{"id":154,"name":155,"points":156,"category":157},"11396345","Expounder",134,"languages",{"id":159,"name":160,"points":161,"category":20},"11423070","WrapAPI",111,{"id":163,"name":164,"points":165,"category":20},"11396702","tmux2html",99,false,"v2",{"id":169,"name":5,"line":6,"ai":166,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":170,"maker":11,"domain":10,"tier":19,"attempts":31,"strip":171,"url":9,"mix":172,"praise":66,"objection":71,"sub":21},11397905,[24,25,26,27],"300000003",[31,32,32,31],1793990941007]