27 Apr
2020
27 Apr
'20
11:05 p.m.
On 28/04/20 1:17 pm, Steven D'Aprano wrote:
I think that it is silly to say that you have to be familiar with Eiffel to recognise the connection between running a function once and the word "once".
The connection is very obvious after you know about it. And probably you can guess the meaning if you see an @once decorator in someone's code. But it's less clear that a person who hasn't seen the word "once" used this way will think of searching for it when they want a way to cache the return value of a function. I know I would be more likely to look for something called "cache" or "memoize". (And I already knew about Eiffel's use of "once"!) -- Greg