Agreed. However, a to the _metho_ used to include referencesinto J, I am not sure:
Whether (a) as a new primitive with all of the features imied by older 3GL languages definitions of references, or (b) as an abstracted set of functors writtenin the _current_ version of J ... My own preference would be to change J slightly to allow the use of enclose or _another_ __similar__ primitive to actually constitute the institution of new priitives (via a diefinitional mechanism); previously stated. In addition, this would also allow hte redefinition of existing primitives via library inclusion, as wel as recursive rehoist ofa _new_ version of J defined in terms of _previous_ vertsions of J, directly, an dthe reverse. Woththe exception of irregular areas of syntax (constants, quotes, parentheses, comments,etc.), which n turn could also be mad bootstrappable. (With a lot more care to be taken, because of the syntactic difficulty). PLease note previous discussions in thre archive on the topic of PRK (primitive recursive kernel) and PPL (polymorphic programming language), each very old concepts. On 3/20/06, p j <[EMAIL PROTECTED]> wrote: > > lets define r: as a monad to return a reference to its > right argument, and would display something like: > r: myvar > 'myvar' > A reference would interact normally with most verbs > returning the value of its variable, but with =. and > =: would update the variable pointed to by the > reference. > > i=: 0 > (=: >:) r: i NB. i=: i + 1 > 1 > i > 1 > > UpdateVar2=: 4 : 0 > x =: y > ) > (r: byref) UpdateVar2 'newvalue' > byref > 'newvalue' > > r: could be an adverb or conjunction. > I guess it can be defined now without language support > as long as you are willing to call it with variables > inside quotes. > > A more general alternative that has other uses as well > would be a foreign function that can get an argument > name from inside an explicit function: > ref=: 1 : '666!:0 x' > (myfunc myvar) ref > 'myfunc myvar' > This is different than 5!:5 in that in returns the > names of functions instead of their contents. > > Some extra applications would be in making decorators. > The Memo class we dicussed last week could be > implemented with locales instead of objects > Anotations and property lists attached to functions > and variables as well (for example to make/process > document ation strings, by providing classification > (meta) data about your functions and data. > > An unrelated seemingly small touch that could be > helpful is letting the explicit define process handle > nested definitions by having a definenested enum. > myverb=: monad definenested NB. 3 : 1 > myprivateverb=. 3 : 0 > > ) > )) > This could hopefully let us define multiple classes > inside general files, as well as private explicit > verbs only useful in narrow scopes. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- -- Roy A. Crabtree UNC '76 gaa.lifer#11086 3012B Mornstar Place (legal) Greensboro, NC 27406-6220 336-340-1304 (office/home/cell/vmail) USPS POB 9001 (mail/permanent) Chapel Hill, NC 27515-9001 [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.authorsden.com/royacrabtree http://skyscraper.fortunecity.com/activex/720/resume/full.doc -- (c) RAC/IP, ARE,PRO,PAST (Copyright) Roy Andrew Crabtree/In Perpetuity All Rights/Reserved Explicitly Public Reuse Only Profits Always Safe Traded ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
