Re: Function once: concern
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <002001c46978$a17e56a0$0d01a8c0@MarkVaio> |
Paul Prescod wrote: > Lenard Lindstrom wrote: > >> A while back it was decided to use the anon, by convension, for >> declaring anonymous function. As such it is just a throw-away name. >> But this causes a problem for anonymous functions with a once: >> section. > > Another good reason to just dump once: functions. They are basically > equivalent to conditional statements. Why complicate the language? > > init: I like, once: I don't. The once section has nothing to do with this problem. This is a problem of using static vars in different functions with the same name. So far we have one vote specifically for once and your one vote specifically against once. We have several votes for the overall proposal. I haven't voted. The one vote for is a usage case. Your vote against is a good ole complication argument and nothing more. By the way, what you two are calling init is now "outer" and what you are calling once is now "init". I never agreed to call them init and once. I might agree to call them "outer" and "once".