4 ms·
I agree, thank you for the correction. In this context what I mean by stateless is a function call that only depends on the input - given the same starting pos
by croo 4y ago
I agree, thank you for the correction.
In this context what I mean by stateless is a function call that only depends on the input - given the same starting position it will always produce the same result.
In real world what messes up this behaviour are fields in a class, properties in a file, persistent data of any form and globally initialized variables unknown to the caller.
You don't and will never have an easy way to reproduce, find out or modify these values so ideally you should not put data in database, not use property files and not use fields in classes :)
Yeah... I never said it was easy or doable in real world. But it is a great compass to drive towards a good architecture.