[{"data":1,"prerenderedAt":318},["ShallowReactive",2],{"project-6529948":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":44,"post_text":46,"what":47,"said":76,"maker_in_thread":141,"shape":153,"grid":158,"attempts":280,"same_week":281,"maker_shows":41,"maker_hidden":310,"reader_version":311,"card":312},"6529948","NSString Ruby","NSString + Ruby","title","Show HN: NSString + Ruby","https:\u002F\u002Fgithub.com\u002Fzdavison\u002FNSString-Ruby","github.com","thingsdoer",1381438141,2013,87,52,275,1739,16,"notable","languages","objective-c library","library",[24,25,26,27,28],"objective-c","nsstring","ruby methods","category extension","ios","curious",0.325,{"positive":32,"neutral":33,"mixed":34,"critical":35},10,14,0,3,27,{"idea":38,"design":40,"execution":42},{"positive":39,"critical":34},6,{"positive":34,"critical":41},1,{"positive":34,"critical":43},2,[45,34,35,45,34,35,45,45,41,34,34,34,35,35,34,41,34,41,45,35,34,34,34,34,34,34,45,34,45,35,35,45,35,35,34,35,35,34,35,45],5,null,{"problem":48,"audience":59,"pricing":46,"motivation":46,"time_to_build":46,"stack":70,"openness":75,"stage":75,"team_size":75},{"value":49,"source":50,"evidence":51},"Verbose NSString API for common string operations","inferred",[52,56],{"id":53,"by":54,"text":55},"6531544","jakobe","One thing that irks me is that the author doesn't stick to ObjC naming conventions. Take for example the capitalize methods. In ruby, you have \"capitalize\" and \"capitalize!\" to…",{"id":57,"by":11,"text":58},"6530477","There are already a lot of Ruby categories out there. ObjectiveSugar covers a lot of bases. I personally wouldn't import more Ruby categories. The NSString API is a weak point of…",{"value":60,"source":50,"evidence":61},"Objective-C developers",[62,66],{"id":63,"by":64,"text":65},"6530486","sarreph","This is awesome and, as an Obj-C dev, is yet another thing that makes me want to learn Ruby.",{"id":67,"by":68,"text":69},"6530102","pdenya","Very impressive. I didn't know about objectAtIndexedSubscript and objectForKeyedSubscript so I wouldn't have thought this was possible as a category.",[71],{"value":72,"source":50,"evidence":73},"Objective-C",[74],{"id":63,"by":64,"text":65},"unknown",{"praise":77,"objections":88,"requests":106,"questions":118,"alternatives":126},[78],{"value":79,"source":80,"evidence":81},"Useful and makes Objective-C more readable","commenter",[82,86,87],{"id":83,"by":84,"text":85},"6529971","YoyosForUs","Wow, this looks really useful. Thanks for building this!",{"id":67,"by":68,"text":69},{"id":63,"by":64,"text":65},[89,99],{"value":90,"source":80,"evidence":91},"Adding methods to core Foundation classes risks future conflicts with system methods",[92,96],{"id":93,"by":94,"text":95},"6530152","chrisdevereux","They look like convenient additions... but I'd be reluctant to add so many category methods onto a Foundation class. Especially for un-prefixed methods. If a future version of…",{"id":97,"by":94,"text":98},"6530201","Methods are often added to core classes like NSString. For example, in iOS 6: https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Fios\u002Freleasenotes\u002FGeneral\u002FiOS60APIDiffs\u002Findex.html And you…",{"value":100,"source":80,"evidence":101},"Naming does not follow Objective-C conventions for mutating methods",[102,103],{"id":53,"by":54,"text":55},{"id":104,"by":54,"text":105},"6531873","I'm not really sure I understand; why would calling the method \"capitalize\" instead of \"capitalizeInPlace\" be inconsistent? (Also, the comments in the header file and the README…",[107],{"value":108,"source":80,"evidence":109},"Add a string format method",[110,114],{"id":111,"by":112,"text":113},"6530144","mamcx","Add a String format one, then is set!",{"id":115,"by":116,"text":117},"6530404","mikeash","Unfortunately, although there's no particular reason for it, you're not allowed to write a method that takes only variadic arguments. This doesn't work: ``` - (NSString *)format:…",[119],{"value":120,"source":80,"evidence":121},"Is a category like a C# extension method?",[122],{"id":123,"by":124,"text":125},"6530202","hamxiaoz","Is 'category' like a extension method in c#?",[127,134],{"value":128,"source":80,"evidence":129},"ObjectiveSugar",[130],{"id":131,"by":132,"text":133},"6530916","sjm","ObjectiveSugar: https:\u002F\u002Fgithub.com\u002Fmneorr\u002FObjectiveSugar",{"value":135,"source":80,"evidence":136},"RubyMotion",[137],{"id":138,"by":139,"text":140},"6530997","w0rdson","I have to add the obligatory pitch for just using RubyMotion. I use it\u002Flove it, and def recommend it for those that have become a bit annoyed with the verbose-ness of obj-c.",{"comments":142,"answered":35,"key":143},11,[144,147,150],{"id":145,"text":146},"6531750","-(NSString*)capitalizeInPlace; is the actual signature. The reasoning for this is for consistency, while still maintaining autocomplete proximity.",{"id":148,"text":149},"6531933","The issue with the default syntax in NSString is that the mutating methods are the more concise, but are also the ones you use the least. It makes far more sense for the more…",{"id":151,"text":152},"6532214","That's an extreme edge case though, since if you're using a mutating method, you're using a mutating string, and you're probably aware of that.",{"commenters":154,"max_depth":155,"maker_replies":142,"first_comment_mins":156,"lifespan_hours":157},30,7,4,20,[159,163,167,171,174,177,179,183,185,189,192,194,196,198,201,203,204,205,207,208,210,213,215,216,219,221,222,225,227,229,232,234,237,240,241,244,246,248,251,253,255,256,257,259,260,262,265,267,269,271,273,276],[160,34,45,161,162,34],"6530493","project\u002Fpositive\u002Fidea","dennis_vartan",[164,34,34,165,166,34],"6530602","commenter\u002Fneutral\u002Fnone","cheesylard",[168,34,35,169,170,34],"6530617","project\u002Fneutral\u002Fdesign","wrl",[172,34,45,161,173,34],"6530724","stefan_kendall",[175,34,34,165,176,34],"6531300","bennyg",[178,34,34,165,162,34],"6531436",[180,34,35,181,182,34],"6530987","project\u002Fneutral\u002Fidea","numo16",[184,34,45,161,176,34],"6531297",[186,34,45,187,188,34],"6531389","project\u002Fpositive\u002Fnone","reginaldjcooper",[190,34,45,187,191,34],"6531711","khangtoh",[53,41,41,193,54,34],"project\u002Fcritical\u002Fdesign",[195,41,34,165,191,34],"6531673",[197,41,34,165,54,34],"6531891",[199,41,34,165,200,34],"6531956","fosk",[145,41,34,202,11,41],"maker\u002Fneutral\u002Fdesign",[104,41,35,169,54,34],[148,41,34,169,11,41],[206,41,35,169,54,34],"6532174",[151,41,34,165,11,41],[93,43,41,209,94,34],"project\u002Fcritical\u002Fexecution",[211,43,34,212,11,41],"6530158","project\u002Fneutral\u002Fexecution",[214,43,34,212,11,41],"6530197",[97,43,41,209,94,34],[217,35,45,161,218,34],"6530221","jph",[57,35,34,220,11,41],"maker\u002Fneutral\u002Fidea",[131,35,35,181,132,34],[223,35,34,165,224,34],"6531034","danenania",[138,156,34,226,139,34],"other\u002Fneutral\u002Fnone",[228,156,34,226,224,34],"6531023",[230,156,34,226,231,34],"6531193","joshdotsmith",[233,156,34,226,188,34],"6531401",[235,156,34,226,236,34],"6531754","hboon",[238,45,34,226,239,34],"6534447","andrewgross",[63,39,45,161,64,34],[242,155,34,226,243,34],"6531929","masklinn",[245,155,34,226,11,41],"6531935",[67,247,45,161,68,34],8,[249,247,35,212,250,34],"6530460","fleitz",[123,252,35,181,124,34],9,[254,252,35,181,250,34],"6530452",[83,32,45,187,84,34],[111,142,35,181,112,34],[258,142,34,181,11,41],"6530159",[115,142,35,181,116,34],[261,142,34,181,11,41],"6530426",[263,142,35,181,264,34],"6530714","koenigdavidmj",[266,142,34,181,11,41],"6530737",[268,142,35,181,116,34],"6530796",[270,142,34,165,11,41],"6530885",[272,142,35,181,176,34],"6531310",[274,142,35,212,275,34],"6531219","plorkyeran",[277,278,45,187,279,34],"6530071",12,"misiti3780",[],[282,287,292,296,301,305],{"id":283,"name":284,"points":285,"category":286},"6550682","SublimeDash",68,"productivity",{"id":288,"name":289,"points":290,"category":291},"6553282","oEmbed",61,"infrastructure",{"id":293,"name":294,"points":295,"category":286},"6553304","High Five",59,{"id":297,"name":298,"points":299,"category":300},"6553692","Dnsyo",56,"dev_tools",{"id":302,"name":303,"points":304,"category":286},"6562352","Hacker News Talk",48,{"id":306,"name":307,"points":308,"category":309},"6554510","jack.minardi.org",40,"hardware",false,"v2",{"id":313,"name":5,"line":6,"ai":310,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":314,"top":18,"kw":315,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":316,"url":9,"mix":317,"praise":79,"objection":90,"sub":21},6529948,0.33,[24,25,26,27,28],"5035035510003301015300000050533533033035",[32,33,34,35],1793990898470]