ollowing code
class A
end
a = A.new
def a.method()
end
this creates an anomynous subclass of A and makes a an instance of the
new class.
--
Mark Sparshatt
Larry Wall wrote:
On Fri, Aug 13, 2004 at 02:12:06PM +0100, mark sparshatt wrote:
: My main worry with this approach is how it would interact with slurpy
: args. I mean if method is defined as
:
: def method(*args)
: ...
: end
:
: how do I make sure that $clos doesn't become part of args
Leopold Toetsch wrote:
mark sparshatt wrote:
I'd like advice on how to handle method invocations that include
special block parameters such as
method() {do something}
The idea is to turn the block into a closure pmc. The problem is how
to pass this to the method, so that it knows that i
y code. I'm not sure
it's a good idea to modify the calling conventions for the benefit of
just one user language.
--
Mark Sparshatt
Dan Sugalski wrote:
At 6:53 PM +0100 4/8/04, Mark Sparshatt wrote:
It seems that for Ruby instance variables can be modelled using
attributes, but I couldn't see any way of handling class variables.
So, what is the recommended way of handling them?
First, one takes the bat la
f the attribute list for the class, which is used to store the
objects values?
It seems that for Ruby instance variables can be modelled using
attributes, but I couldn't see any way of handling class variables. So,
what is the recommended way of handling them?
--
Mark Sparshatt
lass_method will produce an error
but in Java
foo = new Foo
foo.class_method will work
Though rather than having a seperate call class method operation it
might be better to hide the logic that checks for any class methods
withing the JavaObject pmc.
--
Mark Sparshatt
--
Mark Sparshatt
Brent "Dax" Royal-Gordon wrote:
Mark Sparshatt wrote:
The problem is what happens when some Python code tries to call a class
method on a Ruby object? if Python doesn't know about the hidden
reference within Foo it won't be able to find Foo' in order to call the
Karl Brodowsky wrote:
Mark Sparshatt wrote:
The problem is what happens when some Python code tries to call a class
method on a Ruby object? if Python doesn't know about the hidden
reference within Foo it won't be able to find Foo' in order to call the
method.
The issue you ar
This is another message that should have gone to the list :-[
Karl Brodowsky wrote:
Mark Sparshatt wrote:
From the description in PDD15 I'm not sure how to hand languages
where a class is also an object. Where Foo is an instance of Foo'
which is an instance of Class.
Could this
I promise I will learn hwo to use my email program. This should have
gone to the mailing list :-/
Dan Sugalski wrote:
At 10:22 PM + 3/12/04, Mark Sparshatt wrote:
Hi,
I've been reading PDD15. It seems that if the object foo is an
instance of the class Foo then foo is a ParrotObjec
mc, so Class and Foo' would be
ParrotMetaClasses, Foo would be a ParrotClass and foo would be a
ParrotObject
I think this will also be an issue with Python since that allows classes
to have metaclasses.
--
Mark Sparshatt
tation
*/
is any better than
=pod
Some POD documentation
=cut
Or maybe it'd be helpful to have a beginners guide to POD, for people who are
more used to another languages doc style.
Best Regards
Mark Sparshatt
ents or suggestions would be appreciated
Regards,
Mark Sparshatt
14 matches
Mail list logo