Re: Wheter to return `super init' or allow the implicit self to be returned instead
Samuel Colque Flores <[email protected]> Sun, 26 Jun 2022 16:41:06 -0400
| Newsgroups | gmane.comp.lang.smalltalk.gnu.general |
|---|---|
| Message-ID | <CAP5mUxOakuTSLZ3du-xGoy_asLLM9LoaCjG2Hv_Ww_88OHXb8Q@mail.gmail.com> |
Welcome Luis Maybe, you were reading the GNU Smalltalk User's Guide. If so, at section 6.4.4 (Defining an intance method) you may find the following text: ``For clarity of programming, you might consider explicitly returning self in cases where you intend the return value to be used.'' In my opinion, the statements: ^self ^super init are fine when one wants to stress his intention to return `self'. To answer your question: There are no preferences among programmers. Wheter to return or not is up to you and your intentions.