Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread Joe Bogner
app, and you > always know what sound files are being played at any time. > I am wondering how such things would be achieved in J. I suppose locales > do the trick. > > --- Original Message --- > > From: "Raul Miller" > Sent: August 14, 2014 2:38 AM > To: "P

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread bill lam
rick. > > --- Original Message --- > > From: "Raul Miller" > Sent: August 14, 2014 2:38 AM > To: "Programming forum" > Subject: Re: [Jprogramming] Singleton Objects in J > > From my current point of view, if you want to do "object oriented &g

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread Jon Hough
the trick. --- Original Message --- From: "Raul Miller" Sent: August 14, 2014 2:38 AM To: "Programming forum" Subject: Re: [Jprogramming] Singleton Objects in J >From my current point of view, if you want to do "object oriented programming" in J, it's pro

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread Raul Miller
t can be > created which will all have their independent modifiable "copies" of names > from the locale/class. Even the functions inside the instance may be changed > after creation too. > > > - Original Message - > From: Jon Hough > To: programm...@jsoft

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread 'Pascal Jasmin' via Programming
- Original Message - From: Jon Hough To: programm...@jsoftware.com Cc: Sent: Wednesday, August 13, 2014 9:49:11 AM Subject: Re: [Jprogramming] Singleton Objects in J I think it will take a while to digest all that. But I think what you are saying is that in J we dont need to define an o

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread Jon Hough
The answer is I am used to Java, C# etc and just tried to ape those methods. I hadnt thought about using locales. --- Original Message --- From: "Marshall Lochbaum" Sent: August 13, 2014 10:30 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Singleton Objects in J I

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread Jon Hough
Message --- From: "'Pascal Jasmin' via Programming" Sent: August 13, 2014 10:23 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Singleton Objects in J I'm not positive of the exact definition of singleton, but there are 2 common intentions for it. 1. Have e

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread Marshall Lochbaum
I'm confused as to why you would use a singleton object over a named locale. A named locale is easy to locate and can be assigned to a noun just like a numbered locale. It's also impossible to create another copy of the locale. Marshall On Wed, Aug 13, 2014 at 10:25:54AM +0100, Jon Hough wrote: >

Re: [Jprogramming] Singleton Objects in J

2014-08-13 Thread 'Pascal Jasmin' via Programming
hen use them in all the classes you want to be javalike by adding the line coinsert 'javalike' to those locales. - Original Message - From: Jon Hough To: "programm...@jsoftware.com" Cc: Sent: Wednesday, August 13, 2014 5:25:54 AM Subject: [Jprogramming] Singleton Obj

[Jprogramming] Singleton Objects in J

2014-08-13 Thread Jon Hough
I looked through the jsoftware website but couldn't find any references tocreating singleton objects in J.So I created my own singleton pattern for J. It seems to work. coclass 'Singleton' NB. static instanceinstance =: 0 NB. private constructorcreate =. verb defineval =: 1) NB. Public getter