Functions are not global, but instead are members of objects which means that they could be called only on the instance of a specific object ( pedant’s comment: some classic procedural languages have module system and therefore visibility scopes, procedural language != C). Object-oriented programming style tends to limit function visibility. The function resolution in procedural language is based on procedure/function name and its parameters only and in most cases static. In python, for example one calls function by name and if the parameters are wrong, an exception will be thrown in runtime. Of course types have meaning only in case of statically typed languages. Procedural programming tends to use global functions and resolve them statically based on the name and argument type. Let’s look on them from the point of function resolution or dispatch (meaning which function will be used in which case). It is well known, that there are three main programming paradigms ( pedant’s comment: there are other paradigms as well):Īll those approaches work with functions in one or another way. Namely, the new approach to library and application architecture design, which I call context-oriented programming. In this article I will try to describe a new interesting phenomenon which appeared as a by-product of fascinating progress made by Kotlin development team.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |