-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On May 22, 2008, at 6:51 PM, Mark W. wrote:
that? Just curious.
///ark
“Hot code replace” comes to my mind. Completely reloading a class
while keeping the system running. There, it makes sense to completely
obliterate the old class.
Actually, this is how the RoR class-reloading in development mode
works. They clear all loaded application classes so that they are
loaded again by the classloader upon need. (via const_missing)
About “class name”. Yes, #name is just a method. So is #instance_eval
and #type and almost every other method. So you could argue that there
is no such thing as evaluation in an instance context or a type as
language features. On that standpoint, you could argue that there are
no classes in ruby, because Ruby only exists of undefinable masses:
===
class Object
def class
“undefinable mass”
end
end
Lets put it like that: In most sane Ruby systems, #name is either the
name of the constant a class was bound to or “”, the first being named
(with a “class name”), the other one anonymous (or call it “ad-hoc”,
if you prefer). Also, the inability of #name to tell you the internal
name of a class doesn’t mean that it doesn’t have one. This may be a
verbal convention and not be enforcemed by the interpreter, but it is
a common and reasonable concept. I see no use in oh-so-cool nitpicking
that makes it much harder for not-so-zen rubyists to follow discussions.
Regards,
Florian G.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkg2ZR8ACgkQJA/zY0IIRZYUNwCfR5r7LiPwdrH4TirnxjxgG6ZU
UNgAnih2Bt6gDeWK7i7ss71xxW3F+meT
=R5cD
-----END PGP SIGNATURE-----