See comments below....

Kevin Toppenberg wrote:
See below

On 9/5/05, Maury Pepper <[EMAIL PROTECTED]> wrote:
  
----- Original Message ----- 
From: "Kevin Toppenberg"
Sent: Monday, September 05, 2005 7:50 AM
Subject: Re: [Hardhats-members] Namespacing rationale?


    
So you are saying that I don't have to use namespaced variables except
in the conditions you list.  But even so, I might have a name
collision with something in Kernel etc during a call.

      
You can avoid collisions with incoming variables by NEWing everything except
what is passed to you.  
    

I'm with you so far...

You can avoid downstream collisions by NEWing
  
everything except what you are passing to the callee.  
    

I don't follow you here.  I think you are saying, again, to NEW all
variables used in one's function.  But how will this avoid downstream
collisions.  For example, if I use a variable named "%" (and I would
never do such a thing...), then how could I be sure that I will not
have a name collision if I call the Kernel--even if I NEW it?  I have
no control over Kernel code.

  
ABC     ;
          N X
          S X=5
          D
           .N
           .D ^XYZ
          W !,X
          Q

The problem with the above is that it hides all the variables, making code that depends on global-scoped variables to be unavailable for calling from within your code.  Also, the hit on memory could be intense as you are hiding everything and a few cases of this on the stack could create a severe memory shortage for the process.

So that might be an argument for only using one's namespaced
variabled.  But it would be bigger argument that all VistA code should
not depend on global-scoped variables!
  
This is why the curly brace adoption you proposed would be useless to VistA.  It grew up in very different times and made some fundamental decisions at its core that would be violated in this new world.
You must step down a
  
DO-level before doing the call so that everything saved will be popped back
when you QUIT from that DO.

    
I agree with your scoping concerns.  But I don't see how that could
change in the language without breaking old code.

      
Cache did it by encapsulating the new code with braces. It works quite
well.
    

I think that WorldVistA should look into funding the encoding of these
language extensions from Cache into GT.M.  Are they copyrited?  If so,
they shouldn't be.  If they are not one-platform dependent, then they
might be accepted into the SAC etc.

Thanks
Kevin

  
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

    


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

  

-- 
Greg Kreis      http://www.PioneerDataSys.com

"You are today where your thoughts have brought you, you will
   be tomorrow where your thoughts take you." (James Lane Allen)

Reply via email to