APL objects in a Class-namespace

Writing and using Classes in Dyalog APL
Post Reply
User avatar
giangiquario
Posts: 46
Joined: Thu Nov 26, 2009 8:55 am
Location: Milano, Italia

APL objects in a Class-namespace

Post by giangiquario »

In Dyalog 11.2 I defined a Class called myC.
Then I created a namespace
'myNS' myC.⎕ns ''
Then I edited myC
)ed myC
and fixed it.
The namespace myC.myNS has vanished.
Did I something wrong or meaningless?
??? Must I define myNS inside myC by means of a statement like:
:namespace myNS
User avatar
StefanoLanzavecchia
Posts: 113
Joined: Fri Oct 03, 2008 9:37 am

Re: APL objects in a Class-namespace

Post by StefanoLanzavecchia »

Every time a class (or namespace) is refixed from a script the target namespace is rebuilt from scratch.
alexbalako
Posts: 16
Joined: Mon Nov 30, 2009 8:58 pm

Re: APL objects in a Class-namespace

Post by alexbalako »

Ideally class script should match class/namespace state changes made outside of script editor reflecting workspace state.
Practically if outside of namespace script, namespace was changed by adding a 10000x10000 array it would be not reasonable placing definitions of that 10000x10000 array in a class/namespace script as text.
One more reason to have script definition separate from class/namespace state in WS is to have chance to refresh state of class static/shared members to original state.
Post Reply