Stateless and pure

From EiffelStudio: an EiffelSoftware project
Revision as of 13:26, 29 June 2011 by Manus (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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 for redefinition:

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