That is cool.  Carry on.

I was just assuming that constructor params were always '' from not looking 
carefully.




----- Original Message -----
From: Michal Wallace <[email protected]>
To: [email protected]
Sent: Sunday, January 3, 2016 10:31 AM
Subject: Re: [Jprogramming] feedback wanted for mandelbrowse tutorial

On Sun, Jan 3, 2016 at 8:37 AM, 'Pascal Jasmin' via Programming <
[email protected]> wrote:

> mistyped sorry
>
>
> mbrowse_z_ =: conew bind 'mbrowse'



Oh. If I do this, then mbrowse'' returns a new namespace, but doesn't
actually run the constructor.

(f bind y) x  -> (f y)
(f & y) x -> (x f y)

I tend to use (ClassName_z_ =: conew & 'ClassName') so that you can just
use the class name itself as as a constructor,
python-style. :) This particular constructor doesn't take any arguments,
but you still have to pass something in, or the
constructor won't run at all...

I kind of like this style for defining classes, but I'm willing to adapt...
Is there a better way?

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to