It is currently Mon Nov 20, 2017 5:36 pm


All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sat Feb 01, 2014 5:05 pm 
User avatar

Joined: Mon Jan 31, 2011 12:03 pm
Posts: 27
Location: Watsonville, CA (USA)
Real Name: Greg Woodhouse
Began Programming in MUMPS: 01 Oct 1992
I do not see any language here for the $REFERENCE extension, just an icon suggesting there is an attachment. Where can I find the proposed language?


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sat Feb 01, 2014 5:11 pm 
Site Admin
User avatar

Joined: Mon Nov 01, 2010 1:58 pm
Posts: 205
Location: Seattle, Washington
Real Name: Frederick D. S. "Rick" Marshall
Began Programming in MUMPS: 15 Jun 1984
Greg, go to the bottom of the original post, hover over the name of the file, click on it, and it should download. Depending on your browser, you might have to control-click.

_________________
Frederick D. S. "Rick" Marshall, VISTA Expertise Network, 819 North 49th Street, Suite 203, Seattle, Washington 98103, (206) 465-5765, rick dot marshall at vistaexpertise dot net
"The hidden harmony is best." - Heraclitus of Ephesus


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sat Feb 01, 2014 9:16 pm 
User avatar

Joined: Mon Jan 31, 2011 12:03 pm
Posts: 27
Location: Watsonville, CA (USA)
Real Name: Greg Woodhouse
Began Programming in MUMPS: 01 Oct 1992
I don't see a problem with this language, but I'm not thrilled with the idea of setting $REFERENCE, it seems like a more cryptic version of subscript indirection, and I'm not sure what problem it solves. Caché has an interesting compromise solution. As far as reading goes , $ZEEFERENCE works just like $REFERENCE, but you can only set $ZREFERENCE to. "", and that has the effect of clearing the naked indicator (which can be useful). Otherwise, I don't see a reason to set $REFERENCE, unless you like to use lots of naked references in your code.


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sat Feb 01, 2014 10:11 pm 
Site Admin
User avatar

Joined: Mon Nov 01, 2010 1:58 pm
Posts: 205
Location: Seattle, Washington
Real Name: Frederick D. S. "Rick" Marshall
Began Programming in MUMPS: 15 Jun 1984
X11/1993-39 $REFERENCE is half of a pair of MDC Type A Extensions aimed at getting the naked indicator under better control in light of the module programming extensions added as part of MUMPS 1990. If the naked indicator is changing within subroutines, then that is a side effect that they are leaving behind, violating encapsulation. The solution is twofold. First, this extension lets your subroutine save off $REFERENCE at the start by setting some other variable equal to it, and then restore it at the end by setting $REFERENCE to that saved-off value. Second, X11/1998-30 NEW $REFERENCE gives you a simpler way to so just that, by newing it at the start of your subroutine; that will leave the setting of $REFERENCE just for special cases, probably involving infrastructure packages.

I'll post the NEW $REFERENCE extension soon, to help complete the picture they paint together.

Does that make sense?

_________________
Frederick D. S. "Rick" Marshall, VISTA Expertise Network, 819 North 49th Street, Suite 203, Seattle, Washington 98103, (206) 465-5765, rick dot marshall at vistaexpertise dot net
"The hidden harmony is best." - Heraclitus of Ephesus


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sun Feb 02, 2014 12:42 pm 
User avatar

Joined: Mon Jan 31, 2011 12:03 pm
Posts: 27
Location: Watsonville, CA (USA)
Real Name: Greg Woodhouse
Began Programming in MUMPS: 01 Oct 1992
If that is the goal, NEW $REFERENCE would seem safer and clearer if it is supported. Will the new language support this paradigm? I'm all in favor of avoiding side effects.


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sun Feb 02, 2014 12:50 pm 
Site Admin
User avatar

Joined: Mon Nov 01, 2010 1:58 pm
Posts: 205
Location: Seattle, Washington
Real Name: Frederick D. S. "Rick" Marshall
Began Programming in MUMPS: 15 Jun 1984
Greg, yes X11/1998-30 NEW $REFERENCE was accepted by the MDC as a Type A Extension to the language on 1 May 1998, and it is listed in the MUMPS 2015 map for inclusion in the next standard. I'll post it soon.

_________________
Frederick D. S. "Rick" Marshall, VISTA Expertise Network, 819 North 49th Street, Suite 203, Seattle, Washington 98103, (206) 465-5765, rick dot marshall at vistaexpertise dot net
"The hidden harmony is best." - Heraclitus of Ephesus


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sat Mar 29, 2014 3:54 pm 
Site Admin
User avatar

Joined: Mon Nov 01, 2010 1:58 pm
Posts: 205
Location: Seattle, Washington
Real Name: Frederick D. S. "Rick" Marshall
Began Programming in MUMPS: 15 Jun 1984
For certain values of "soon."

_________________
Frederick D. S. "Rick" Marshall, VISTA Expertise Network, 819 North 49th Street, Suite 203, Seattle, Washington 98103, (206) 465-5765, rick dot marshall at vistaexpertise dot net
"The hidden harmony is best." - Heraclitus of Ephesus


Top
Offline Profile  
 
 Post subject: Re: 2. X11/1993-39, $REFERENCE
PostPosted: Sun Apr 06, 2014 4:36 am 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 103
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
toad wrote:
Greg, yes X11/1998-30 NEW $REFERENCE was accepted by the MDC as a Type A Extension to the language on 1 May 1998, and it is listed in the MUMPS 2015 map for inclusion in the next standard. I'll post it soon.


Toad et al, NEW $REFERENCE and SET $REFERENCE="" are reasonable all other SET $REFERENCE=krap are neither reasonable nor useful.

I STRONGLY suggest that the proposed standard reads that $REFERENCE may be NEWed and may be SET to the null string and that's it.

Ray Newman
(with 35 years MUMPS programming experience)


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net