Difference between revisions of "Stateless and pure"

Line 7: Line 7:
 
         ...
 
         ...
 
     end</e>
 
     end</e>
 +
 +
With some validity rules:
 +
* only unqualified calls to stateless features are permitted.
  
 
With some validity rules for redefinition:
 
With some validity rules for redefinition:
 
* once a routine is stateless its redefinitions have to be stateless.
 
* once a routine is stateless its redefinitions have to be stateless.
 
* a stateful routine can become stateless.
 
* a stateful routine can become stateless.

Revision as of 05:32, 29 June 2011

Proposal to have stateless routines to use the equal sign of constants, i.e.

f (a: STRING): SOME_TYPE =
    do
        create Result.make (a)
        ...
    end

With some validity rules:

  • only unqualified calls to stateless features are permitted.

With some validity rules for redefinition:

  • once a routine is stateless its redefinitions have to be stateless.
  • a stateful routine can become stateless.