by flossly · 1mo ago · 0 comments
Why would you want that? Just to continue the habit? I'd say regular OOP is, after implicit `null`, the biggest mistake in software.
Crystal is nice, but for network programming, Go simply cannot be beaten by a language that has a equally limited type system.
I don't think anyone who regularly uses Ruby or Python thinks OOP is a mistake, it's in how you use it and whether one likes the OOP design of the language.
I think the Lisps kind of have up on being an interpreter and I feel they lost some of their power because of it.
I kind of see Ruby waning right now, I don't think it offers much with the development of LLMs. I don't think adding typing is the key - but I anticipate there will be a kind of LLM-powered Smalltalk resurgence
I would have loved Go more if they had made "lightweight" classes a thing, something feels wrong tying structs and functions, you could have added a wrapper around both to make the code more organized. I guess that's what I like about OOP, organized code. I don't even care about most OOP things, I just want to organize code in a meaningful way.
Most of what I write are functions and data objects (records, basically).
One pattern I use is classes with one function, where the constructor takes the functions dependencies, and the function only takes non-dependency parameters.
Which is why, something like
fun square(num: Int): Int = num * num
gets translated into public final class ExampleKt {
public static final int square(int);
0: iload_0
1: iload_0
2: imul
3: ireturn
}
}
When running javap on the .class file.People really should understand what they talk about avoiding OOP.
Python 3.15.0 (tags/v3.15.0:d220409, Oct 9 2026, 11:55:56) [MSC v.1951 64 bit (AMD64)] on win32
Enter "help" below or click "Help" above for more information.
>>> def sum(x,y):
return x + y
>>> sum(40, 2)
42
>>> type(sum)
<class 'function'>
>>> dir(sum)
['__annotate__', '__annotations__', '__builtins__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__getstate__', '__globals__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__kwdefaults__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_params__']You certainly don't have to write OO Python if you don't want to. Objecting to functions being objects like the person you're replying to is, is a flavour of puritanism I find baffling.
I love this website. It proves that software "industry" is a pop culture after all.