On Fri, Mar 24, 2006 at 04:23:53PM +0100, Leopold Toetsch wrote:
> There are currently 14 opcode variants of C<new>, not counting 
> C<newclass>. But all are limited when it comes to initializers.

What's the situation in which instantiate is required because the current
arrangment doesn't work?  Generally, it's good to know what problem you are
trying to solve before you try to solve it.  :-)

For example:

> Both variants are almost equally fast[2], but the latter has much more 
> potential of passing args e.g.
> 
>   o = __instantiate(.Complex, 2, 3)            # [3]
>   o = __instantiate(.Complex, "2 + 3i")
> 
> or
> 
>   cl = getclass 'MyClass'
>   o =  __instantiate(cl, p0, p1, 'extra' => p2)

Why not use the existing method call technique for this, and simply
standardize on a method name?
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to