Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why isn Kogut object-oriented?

Kogut Object-Oriented
0
10 Posted

Why isn Kogut object-oriented?

0

Kogut is object-oriented, just not in the traditional sense. Instead of classes, Kogut uses types. To hold instance variables, Kogut uses fields (ie. records or structs). For inheritance, Kogut uses subtyping. For methods, Kogut uses functions that dispatch on the types of their arguments. These are more like multimethod than traditional single-dispatch message-passing systems. For private methods, Kogut uses privacy in modules. For class methods, Kogut can either have functions that dispatch on the type TYPE (which all types are in) or you can simply use modules. When discussing Kogut, it is typical to hear people using object to mean any first-class thing. This is typical of functional programmers and does not mean something set up to recieve messages, as it would in a language with traditional object-orientation.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.