Glad to see this being implemented! I realized a need for something like this while I was working at SDI where different developers were creating collections of classes and routines that could be used in multiple programs via ::requires.

While I understand the concept is a way to provide namespaces, I think a more "English-like" choice for the keyword might make it more accessible to the ooRexx programmers who don't have a lot of computer science training. Some of the possible names for the option that I came up with include "as", "qualify", "suffix" and "ID". My current preference is ID. So the syntax would then be:

::requires 'some.file' ID somename

As to the prefix vs suffix question, I prefer suffix - the qualifier being second - as it "reads" more naturally to me.

I hope others offer their opinions on this as well.

On 9/30/2014 6:52 PM, Rick McGuire wrote:
One of the features I've been working on is a concept of namespaces that can be used to disambiguate information pulled in from different ::requires files. The basis if this is a new NAMESPACE option on the ::requires directive where you give a simple name to a loaded requires file.

::requires 'some.file' namespace somename

Once a requires file has been tagged with a namespace name, it can be used to qualify references to classes within that namespace explicitly identify which version you want. As part of this, there is a special reserved namespace of REXX that will allow you to always get to the interpreter-provided version of things.

My thoughts on how the namespace is specified builds on what is done with the message syntax for message sends where we have things like

init~self:super

Where the first token is the target name, the part after the colon is the qualifier. This works for namespaces, but part of me thinks this might be better with the qualifier first.

There are multiple places where this will show up.

1) .variables. This will allow things like .array:rexx~new...or should this be .rexx:array~new?

2) ::class directives.

   ::class foo subclass rexx:object (or should it be object:rexx).

3) Potentially on function calls and call instructions. Again, should it be qualifier first or second?

The more I look at this, the more I think it should be namespace:name rather than name:namespace, but this is the reverse of the method name convention. These are not strictly the the same concept, but it is different. What do others think?

Rick




------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk


_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Gil Barmwater
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to