Skip to main content
14 events
when toggle format what by license comment
Aug 30, 2018 at 15:22 history edited Robert Harvey CC BY-SA 4.0
deleted 14 characters in body
Jan 23, 2013 at 22:47 comment added user40980 @Nemo157 an interesting read - the first time I've seen the intended differences between the methods.
Jan 23, 2013 at 22:40 comment added Nemo157 @MichaelT See briancarper.net/blog/98 or to_s vs to_str, it's not very well defined but they are intended to have different meanings. I do agree that Hash has too many ways of checking its keys though...
Jan 23, 2013 at 14:32 comment added user40980 @Nemo157 to_s and to_string are two methods that do exactly the same thing with the same semantics. Why have two different names for them? Or in Hash, has_key? and include? and key? and member?...
Jan 23, 2013 at 7:42 comment added Nemo157 @MichaelT to_s, to_str and inspect do actually have different semantics though, it just so happens that a subset of them are internally implemented as aliases for String and Array because they output the same thing for these classes.
Jan 21, 2013 at 6:17 comment added Xion @ZacharyYates Lack of "constructor names" can be worked around by exposing a static construction methods instead. This is a standard practice in Java, although not so much in C++.
Jan 17, 2013 at 18:54 history edited Robert Harvey CC BY-SA 3.0
deleted 5 characters in body
Jan 17, 2013 at 7:00 comment added Manoj R +1. You are dealing with developers/programmers. Microsoft idea of "user is monkey", does not work here.
Jan 16, 2013 at 18:42 comment added user40980 "Having multiple function names that do the same thing..." - for a 'good' time, look at Ruby's classes String Hash Array File.
Jan 16, 2013 at 18:15 comment added Zachary Yates In addition, you can't name constructors differently to explain your purpose, readers have to infer it from the parameters. Overloading the constructor this way makes it much harder to understand.
Jan 16, 2013 at 18:09 vote accept Trevor Hickey
Jan 16, 2013 at 18:09 comment added Trevor Hickey lots of up-votes. I will stop immediately. thank you.
Jan 16, 2013 at 18:01 history edited Robert Harvey CC BY-SA 3.0
added 149 characters in body
Jan 16, 2013 at 17:55 history answered Robert Harvey CC BY-SA 3.0