While IDK about Kotlin's extension methods, I do know that C# (A highly popular programming language) also has extension methods so I'll talk about those.
In C#, extension methods are plain static functions defined in a plain static class, the only key difference between normal static methods and these extension methods is that the first argument is prefixed with the "this" keyword. You can invoke extension methods as if they were defined on the type they're extending without actually changing the type, the only requirement is that the namespace that the class containing the method is used (via "using"). Infact, .NET ships with a bunch of extension methods just for the IEnumerable and IEnumerable<T> interfaces in System.LINQ. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/PFNZ7RLRKQEVKPI3WHRLOKFDCYFZOZZS/ Code of Conduct: http://python.org/psf/codeofconduct/