On Sun, 1 Jan 2023 at 14:19, <avi.e.gr...@gmail.com> wrote: > Had a language like that been created today, I wonder if some designs might > have looked a bit different so that some functions could be called with > optional arguments that specified what the user wanted returned.
Frankly, I doubt it. While you can argue "returning self is more useful" vs "returning None is more clear if you get it wrong", having options does NOT improve things, and just makes everything more complicated, slower, harder to comprehend, and generally worse to work with. A language should have some sort of consistent behaviour and stick to it. If that's not possible, an object type should at least have that. ChrisA -- https://mail.python.org/mailman/listinfo/python-list