[{"data":1,"prerenderedAt":208},["ShallowReactive",2],{"project-8179237":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":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":40,"post_text":42,"what":43,"said":74,"maker_in_thread":140,"shape":146,"grid":150,"attempts":172,"same_week":173,"maker_shows":141,"maker_hidden":201,"reader_version":202,"card":203},"8179237","try","Try\u002FCatch\u002FFinally experiment in Go","title","Show HN: Try\u002FCatch\u002FFinally experiment in Go","https:\u002F\u002Fgithub.com\u002Fmanucorporat\u002Ftry","github.com","manucorporat",1408043246,2014,29,11,1005,2272,45,"shown","languages","language experiment","library",[24,25,26,27,28],"go","try catch","exceptions","panic recover","defer","roasted",-0.2,{"positive":32,"neutral":33,"mixed":34,"critical":35},2,0,1,3,6,{"idea":38,"design":39},{"positive":32,"critical":34},{"positive":33,"critical":32},[33,33,34,33,41,41,35,33,34,34,33],5,null,{"problem":44,"audience":51,"pricing":42,"motivation":57,"time_to_build":42,"stack":64,"openness":71,"stage":72,"team_size":73},{"value":45,"source":46,"evidence":47},"Brings try\u002Fcatch\u002Ffinally style exception flow to Go","maker",[48],{"id":49,"by":11,"text":50},"8179742","I totally agree! just to leave it clear, I did not create it to be even used, it's an experiment. I guess, it shows how powerful the panic(), recover(), defer can be, in my…",{"value":52,"source":46,"evidence":53},"Go developers curious about exceptions, not for production use",[54],{"id":55,"by":11,"text":56},"8193811","I add a comment in the README ;) ``` Experiment only!! I as a Go developer, do not recomend to use this library in production or real world code. The Go language was designed to…",{"value":58,"source":46,"evidence":59},"An experiment to explore panic, recover and defer; a learning and fun exercise",[60,61],{"id":49,"by":11,"text":50},{"id":62,"by":11,"text":63},"8179861","I am not trying to learn Go, I have been using it for years (without exceptions :) ) i believe clever hacks are usually helpful to open people's minds, don't you? another…",[65],{"value":66,"source":67,"evidence":68},"Go","inferred",[69],{"id":70},"post","open_source","prototype","unknown",{"praise":75,"objections":95,"requests":121,"questions":126,"alternatives":131},[76,88],{"value":77,"source":78,"evidence":79},"Interesting to read and a fun hack","commenter",[80,84],{"id":81,"by":82,"text":83},"8180022","sanderjd","I found it interesting to read. Seems like enough reason to me. We aren't running out of bits.",{"id":85,"by":86,"text":87},"8180067","PuerkitoBio","Maybe he did it for fun. Hacks don't have to be useful. Brad Fitzpatrick provided a Go solution to goal (https:\u002F\u002Fgithub.com\u002Featnumber1\u002Fgoal). Ken Thompson used to write quines…",{"value":89,"source":78,"evidence":90},"Error-handling flow idea is appealing for large Go projects",[91],{"id":92,"by":93,"text":94},"8180136","heavenlyhash","This is very interesting. The difficulty in handling errors in large-scale golang programs is one of the primary practical issues I experience standing in the way of adopting it…",[96,107,114],{"value":97,"source":78,"evidence":98},"Non-idiomatic; Go deliberately omits exceptions",[99,103],{"id":100,"by":101,"text":102},"8179711","robert_tweed","The usual response to this kind of thing among gophers is \"don't do that\", which is a reasonable response given that if the language designers thought Go should have…",{"id":104,"by":105,"text":106},"8179777","dead10ck","I'm truly not trying to be rude, but if you agree with the above point, then why did you make it publicly available? Only two outcomes can come of this: 1. Nobody uses it, for…",{"value":108,"source":78,"evidence":109},"Finally is no cleaner than defer",[110],{"id":111,"by":112,"text":113},"8179918","koenigdavidmj","I don't see how finally (especially with the unusual order) is much cleaner than defer. That's the main advantage of defer: the idiomatic way to use defer is right after the…",{"value":115,"source":78,"evidence":116},"Cannot return from the try function",[117],{"id":118,"by":119,"text":120},"8179440","baq","limited usefulness - can't return from the trying function. incidentally, try\u002Ffinally and returns are what gives people funny facial expressions.",[122],{"value":123,"source":78,"evidence":124},"Combine try-style flow with typed errors",[125],{"id":92,"by":93,"text":94},[127],{"value":128,"source":78,"evidence":129},"Why publish an experiment the author says shouldn't be used",[130],{"id":104,"by":105,"text":106},[132,136],{"value":133,"source":78,"evidence":134},"Go defer with local functions",[135],{"id":100,"by":101,"text":102},{"value":137,"source":78,"evidence":138},"spacemonkeygo\u002Ferrors library",[139],{"id":92,"by":93,"text":94},{"comments":141,"answered":34,"key":142},4,[143,144,145],{"id":49,"text":50},{"id":62,"text":63},{"id":55,"text":56},{"commenters":147,"max_depth":141,"maker_replies":141,"first_comment_mins":148,"lifespan_hours":149},8,36,95,[151,153,155,157,159,161,162,164,166,168,169],[100,33,33,152,101,33],"commenter\u002Fcritical\u002Fidea",[49,33,33,154,11,34],"project\u002Fneutral\u002Fidea",[104,33,34,156,105,33],"maker\u002Fcritical\u002Fidea",[62,33,33,158,11,34],"commenter\u002Fneutral\u002Fnone",[81,33,41,160,82,33],"project\u002Fpositive\u002Fidea",[85,33,41,160,86,33],[92,34,35,163,93,33],"project\u002Fmixed\u002Fidea",[55,32,33,165,11,34],"maker\u002Fcritical\u002Fdocs",[111,35,34,167,112,33],"project\u002Fcritical\u002Fdesign",[118,141,34,167,119,33],[170,141,33,171,11,34],"8179703","maker\u002Fneutral\u002Fdesign",[],[174,179,184,188,193,197],{"id":175,"name":176,"points":177,"category":178},"8187791","GIFyoutube",577,"creative",{"id":180,"name":181,"points":182,"category":183},"8178660","Tuff.gb",260,"games",{"id":185,"name":186,"points":187,"category":20},"8192801","Satellizer",221,{"id":189,"name":190,"points":191,"category":192},"8178940","Ad Detector",204,"security_privacy",{"id":194,"name":195,"points":196,"category":20},"8192287","Scraperjs",192,{"id":198,"name":199,"points":200,"category":20},"8176672","Way.js",162,false,"v2",{"id":204,"name":5,"line":6,"ai":201,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":205,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":206,"url":9,"mix":207,"praise":77,"objection":97,"sub":21},8179237,[24,25,26,27,28],"00105530110",[32,33,34,35],1793990910459]