Talk:Stateless and pure

I think the way to have stateless routines is simply to put them in classes with no attributes.

Then the class should be marked as stateless in some syntactic way (something more obvious than an = sign - stateless class, perhaps). Tools can then indicate to a programmer that an individual routine happens to be stateless.

Then a (sufficient, but not necessary) validity rule would be that a statefull class inheriting from such a stateless class may not redefine the routine. --Colin-adams 07:36, 1 July 2011 (UTC)