3 ms·
Show HN: Lazy – A Python library for rapidly developing lazy interfaces
- qwerty456127 8y agoCool. Won't it break if a function is "pure" from the practical point of view but in fact uses some variables (e.g. configuration parameters) declared outside of it?
- bwasti 8y agoas long as configuration parameters remain fixed in the life of the execution it is still pure, right?
- qwerty456127 8y agoYes, that's what I mean but I'm not sure from the theoretical point of view. I used to believe a truly pure function isn't mean to access anything but what is passed to it as an argument so it makes me wonder what a particular implementation may expect. Whether or not this is Ok can also depend on a particular language runtime or library (and I'm far from an expert in the Python VM internals so far) - it can be impossible or quirky for a function executed asynchronously to access something that belongs to outside of it.
- bwasti 8y agoah, the assumption is that even the remote call (for example, in the case of async) is pure