Category talk:Ruby: Difference between revisions

(What does this really mean?)
 
(2 intermediate revisions by one other user not shown)
Line 69:
:People tend to point out that if these objects are mutable (e.g. String in Ruby), then it is possible to use its mutation methods to mutate its internal state in a way that is visible to other people who have a reference to the same object; but this is irrelevant. Because it is not the object that is being passed -- it is the reference. We can separate out the mutation issue by using an object type that is not mutable, e.g. take an integer or float or boolean in Ruby, and passing it; see that you cannot affect it in the calling scope; whereas in a true pass-by-reference language, you always can. --[[User:Spoon!|Spoon!]] 07:01, 11 August 2011 (UTC)
::That said, note that this point of view is that you cannot pass an object to a method. --[[User:Rdm|Rdm]] 12:33, 11 August 2011 (UTC)
:::Right; not only can you not pass an object, the point of view is that no expression in the language has the value of an object, only the value of a reference. This is the same point of view as in Java, Python, etc. Whatever we decide has to be consistent across all these languages. --[[User:Spoon!|Spoon!]] 19:44, 11 August 2011 (UTC)
 
== Phantom categories and Ruby's standard library ==
 
A few parts of Ruby's standard library have their own categories.
 
# <code>require 'curses'</code> => [[:Category:Curses]]
# <code>require 'rexml/document'</code> => [[:Category:REXML]]
# <code>require 'tk'</code> => [[:Category:Ruby/Tk]]
 
I am not wanting categories for most other parts of the standard library. I destroyed 11 ''phantom categories'' by removing all their members.
 
# Category:bigdecimal (2 members)
# Category:complex.rb (1 member)
# Category:dRuby (1 member)
# Category:fileutils.rb (1 member)
# Category:mathn (1 member)
# Category:matrix (2 members)
# Category:matrix.rb (3 members)
# Category:minitest (1 member)
# Category:optparse (1 member)
# Category:prime (1 members)
# Category:test/unit (2 members)
 
A ''phantom category'' is a category with some members, but no category page. Templates like <nowiki>{{libheader|prime}}</nowiki> did put pages in these categories. I started to destroy these categories after someone confused Category:prime with [[:Category:Prime Numbers]] ([[Rosetta Code:Village Pump/Grouping tasks#Library/Libheader appears to be being used incorrectly|ref 1]] and [[Talk:Count in factors#phantom categories - incorrect use of Library templates|ref 2]]). I think that many contributors will use the standard library without adding categories. I see code that calls <code>require 'find'</code> or <code>require 'securerandom'</code> without a category. --[[User:Kernigh|Kernigh]] 03:49, 27 August 2011 (UTC)
Anonymous user