Grace˜operator for changing order and scope of implicit parameters
First Claim
1. A method executed by a processor for reordering subroutine parameters in subroutine parameters list, where:
- the method is based on a prefix, single operand operator form named ‘
Grace˜
’
in natural language;
the ‘
Grace˜
’
operator moves the parameter, to which the operator is applied, one position towards a first position in the subroutine parameters list;
and after reaching the first position in the subroutine parameters list, further application of the ‘
Grace˜
’
operator to the parameter is ignored and the parameter stays at the first position in the subroutine parameters list.
0 Assignments
0 Petitions
Accused Products
Abstract
Implicit parameters and implicit arguments are useful in many programming paradigms including functional and logic programming. Implicit parameter declaration order is inferred from the subroutine parameter usage order in the subroutine body. It means that implicit parameters have limited possibilities to be declared in the same order as programmers want. The parameter ignorance operator # allows changing implicit parameter order, but usage of this operator leads to subroutine declaration syntax similar to the syntax of declaring subroutine parameters explicitly, partially losing syntax benefits gained of implicit parameters. In order to preserve all the benefits of implicit parameter usage and allow programmers to change implicit parameter declaration order and scope in concise way, the Grace˜ operator, which is presented in this document, was invented.
14 Citations
8 Claims
-
1. A method executed by a processor for reordering subroutine parameters in subroutine parameters list, where:
-
the method is based on a prefix, single operand operator form named ‘
Grace˜
’
in natural language;the ‘
Grace˜
’
operator moves the parameter, to which the operator is applied, one position towards a first position in the subroutine parameters list;and after reaching the first position in the subroutine parameters list, further application of the ‘
Grace˜
’
operator to the parameter is ignored and the parameter stays at the first position in the subroutine parameters list. - View Dependent Claims (2, 5)
-
-
3. A method executed by a processor for reordering subroutine parameters in a subroutine parameters list, where:
-
the method is based on a postfix, single operand operator form named ‘
Grace˜
’
in natural language;the ‘
Grace˜
’
operator moves the parameter, to which the operator is applied, one position towards a last position in the subroutine parameters list;after reaching the last position in the subroutine parameters list, further application of the ‘
Grace˜
’
operator to the parameter is ignored and the parameter stays at the last position in the subroutine parameters list. - View Dependent Claims (4, 8)
-
-
6. A method executed by a processor for reordering subroutine parameters in subroutine parameters list, where:
-
the method is based on a prefix, single operand operator form named ‘
Grace˜
’
in natural language;the ‘
Grace˜
’
operator moves the parameter, to which the operator is applied, one position towards a first position in the subroutine parameters list;moving subroutine parameter outside the subroutine parameters list to one position before the first position in the subroutine parameters list, leads to parameter removal from the existing subroutine parameters list and adding it to higher visibility scope in the subroutine parameters list; if higher visibility scope subroutine does not exist, then such higher visibility subroutine context is created automatically; redundant subroutine scopes are removed. - View Dependent Claims (7)
-
Specification