Talk:Metaclass

message: The See Also list is larger than the article. Can't it be trimmed?
-- Mikeblas 03:37, 27 January 2006 (UTC)
replies: text: Done.  Next time, Wikipedia:Be bold! Jorend 17:53, 16 February 2006 (UTC)
thread_title:  See Also 

message: Just try to do this:
 Transcript show: (Metaclass new new).
Squeak goes irresponsive and takes 100% CPU usage. Could someone please explain why this happens?
::'cause the Metaclass has no class. Try comp.lang.smalltalk to get a fuller answer. The
::actual interaction between the VM and OS causing the error is beyond the scope of this ::article.Mal4mac 18:39, 13 December 2006 (UTC)
thread_title:  Squeak freezes on double Metaclass instantiation 

message: As far as i can tell, the "Metaclasses in Ruby" reference does not actually describe metaclasses, but a different Ruby concept known as "singleton classes".  Any objections if i go ahead and remove it?  --Piet Delport 09:58, 12 January 2007 (UTC)
replies: text: OK, i've removed it.  --Piet Delport 10:20, 16 January 2007 (UTC)

text: That doesn't provide metaclass functionality:  you can't subclass or otherwise extend it.  (See the discussion about java.lang.Class above.)  --Piet Delport 20:01, 6 June 2007 (UTC)

text: Someone should mention Ruby in the article.  Regardless of whether Ruby has metaclasses, there is a very common perception that it does (google it) and it's worth addressing that in the article.  Ruby's object model *is* in fact very similar to Smalltalk's so it's no surprise that someone would have added that to the article.  Here's something I found by one of the more influential Ruby programmers-- Ruby doesn't have meta classes.  You guys could expand on that and similar articles throughout the web.  The more or less definitive book on Ruby is "The Ruby Programming Language" (written by Matz the creator of Ruby among others).  Like Bini, the authors prefer the term "eigenclass" and use it throughout the text.  In either case, the article right now isn't very well written.  There is a lot of ambiguity, especially on the definition, which states that "a metaclass is a class whose instances are classes."  That is exactly how Ruby's classes work, as Kusunose pointed out earlier.  Piet counters that it isn't sufficient because it can't be subclassed or extended.  If this is true, this belongs in the article, along with a proper citation.  I will add a "Citation needed" tag and let those are more interested in language lawyer-ing figure it out.  -- Solberg (talk) 23:08, 30 August 2009 (UTC)
thread_title:  Ruby? 

message: What's the point of having this?  What is it used for in real life?  —Preceding unsigned comment added by 71.167.68.142 (talk) 01:50, 19 June 2009 (UTC)
replies: text: Metaprogramming, for one thing.  (This is not the only way metaprogramming can be done, though.)  -- Solberg (talk) 23:09, 30 August 2009 (UTC)
thread_title:  ..and? 

message: Is there any reason for the assigning the __slots__ in the python code example? I know about the efficiency gain but that's not the point of this example. --138.246.2.200 (talk) 23:16, 20 September 2011 (UTC)
thread_title:  slots in python code 

message: This is more a general comment after looking at several wiki articles on OO, not that specific to this article per se although it applies here as well. I notice many of the OO articles do this, they talk in very language specific terms rather than first describing the general concepts and they jump fairly quickly to low level coding examples that will quickly lose anyone who doesn't know how to program. IMO, we should focus first on describing the concepts more and do so in a way that isn't specific to C++, Java, Smalltalk or any other language and then perhaps give an example. Examples seem to me (mostly) more appropriate for a technical manual not an encyclopedia anyway. MadScientistX11 (talk) 17:32, 27 December 2013 (UTC)
thread_title:  Examples: Do we really need so many? 

message: The "In Ruby" section currently states " Consequently, eigenclasses form infinite chains. " I notice someone edited out a second sentence about how this leads to an infinite regress. I'm not even sure what "infinite regress" was supposed to mean there but it seems reasonable to take it out but I wonder WTF are these "infinite chains" anyway? I know nothing about Ruby but it's hard for me to imagine how any programming language can support infinity as a run time concept. Does anyone know what this means? Is it really supported by that reference and if so can we say it in a way that makes more sense? If no one replies I'm going to just be bold and delete that sentence completely. --MadScientistX11 (talk) 22:47, 2 December 2014 (UTC)
replies: text: I just found this: 
"But I've already told you: classes store methods. They're different. Now I know you're probably a bit confused wondering, "If a class is an object, but objects are built on classes, isn't there a big confusing infinite cycle here that you're not explaining?"
No, there's not. I hate to break it to you, but a class isn't really an object. From Ruby's source code:"
http://ruby-metaprogramming.rubylearning.com/html/seeingMetaclassesClearly.html
So I'm removing that extra sentence about "infinite chains". --MadScientistX11 (talk) 23:28, 2 December 2014 (UTC)
thread_title:  "Infinite chains" in Ruby? 

message: This section asserts that "In languages without metaclasses, these details are defined by the language specification and can't be overridden." This is oversimplified and incomplete.
For example, while it has nothing approaching metaclasses, the C# language allows the layout of types to be customized using metadata supplied via the Struct Layout Attribute the usage of which is described on MSDN: 
Aluan Haddad (talk) 21:47, 19 February 2015 (UTC)
thread_title:  Python example 

message: The Struct class in Ruby
is not a metaclass, despite having the new class method that creates classes. You can verify that classes created via this method are not instances of Struct.
The following code shows another example of a new method that returns a new class, yet the M object that responds to the method is not a metaclass (it is even a string):
  M = "Metaclazz"
  def M.new
    Class.new
  end
  A = M.new
  p [A, A.class]                # [A, Class]
  p [M, M.class]                # ["Metaclazz", String]
  A.is_a?(M) rescue p $!.class  # TypeError
Please stop vandalizing the In Ruby section.Hundblue (talk) 08:44, 4 May 2015 (UTC)
thread_title:  The Struct class in Ruby 

message: It would be useful to provide some history of the term/concept 'metaclass'.  Who proposed the concept?  Which language first implemented it?  Who proposed the word? John Vandenberg (chat) 01:32, 23 July 2015 (UTC)
thread_title:  History 

message: Hello fellow Wikipedians,
I have just modified 2 external links on Metaclass. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20080903123731/http://www.ibm.com/developerworks/linux/library/l-pymeta.html to http://www.ibm.com/developerworks/linux/library/l-pymeta.html
*Added archive https://web.archive.org/web/20030430162409/http://www.onlamp.com/lpt/a/3388 to http://www.onlamp.com/lpt/a/3388
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 15:06, 26 January 2018 (UTC)
thread_title:  External links modified (January 2018) 

message: Compare these two:  In the former, the "instanceof" labels are floating, labeling nothing.  In the latter we have instanceof arrows.
  — Preceding unsigned comment added by 174.62.125.132 (talk) 16:25, 20 April 2018 (UTC)
thread_title:  Smalltalk-80 metaclasses diagram thumbnail omits instanceof arrows but keeps instanceof labels floating in space. 

message: The page specifies that C++ metaclasses are planned for C++ 23, but I find no evidence that this is planned for release in this version. In particular, C++23 - cppreference.com makes no mention of metaclasses. Could someone confirm if this is indeed planned and undocumented, or just an error in this page ? 192.54.145.138 (talk) 12:24, 25 April 2023 (UTC)
thread_title:  C++ metaclasses