Re: Objects, classes, metaclasses, and other things that go bump in the night

2004-11-30 Thread mark sparshatt
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

Re: Handling block parameters in Ruby

2004-08-14 Thread 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

Re: Handling block parameters in Ruby

2004-08-13 Thread mark sparshatt
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

Handling block parameters in Ruby

2004-08-13 Thread mark sparshatt
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

Re: Attribute questions

2004-04-08 Thread 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

Attribute questions

2004-04-08 Thread Mark Sparshatt
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

Re: Classes and metaclasses

2004-03-13 Thread 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

Re: Using Ruby Objects with Parrot

2004-03-13 Thread 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

Re: Using Ruby Objects with Parrot

2004-03-13 Thread Mark Sparshatt
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

Re: Using Ruby Objects with Parrot

2004-03-13 Thread Mark Sparshatt
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

Re: Using Ruby Objects with Parrot

2004-03-13 Thread Mark Sparshatt
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

Using Ruby Objects with Parrot

2004-03-12 Thread Mark Sparshatt
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

Re: Parrot file list

2002-10-05 Thread 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

Parrot file list

2002-10-04 Thread mark sparshatt
ents or suggestions would be appreciated Regards, Mark Sparshatt