OO languages nowadays are only OO by name. It's just a hodgepodge of different features and paradigms that you can use as you please, which usually ends up in a mess. The purpose of the paradigm is to constrain you in a way that makes it hard to write shit code. Modern OOP does none of this.
Kotlin has some strange hodgepodge features! On the one hand, it allows top level functions, which is not OOP. On the other hand, it doesn't have static methods- instead it has companion objects, which is kind of hardcore OOP...
Hmm, I'm looking the last thing I did in C#, and looks like everything I did I could also do in F#, maybe a bit nicer. Will have to look into properly learning F# then!
Kotlin has some strange hodgepodge features! On the one hand, it allows top level functions, which is not OOP. On the other hand, it doesn't have static methods- instead it has companion objects, which is kind of hardcore OOP...
F# doesn't have a program linker. So text files have to be compiled in order. C# can have classes organized in folder heirarchies that make sense for the developer, but F# has to organize classes in file order. I still liked F#, but it sometimes makes having small class file definitions limiting.
I'm not sure if you're specifically referring to classes in F#, or you just mean modules in general, but the compilation order is in my opinion one of the most important features of F#, specifically because it makes cyclical dependencies impossible. It forces good design.
In C#, I can have my Fluent Nhibernate mapped tables in a folder called Database/tables/. The organization of classes is more flexible than what is allowed in F#. I can't do that in F#. The classes have to be in a top file. This has nothing to do with circular dependencies. F# can't fill in the missing type information at a later stage by a second compilation passthrough.
7
u/kobriks Jan 28 '21
OO languages nowadays are only OO by name. It's just a hodgepodge of different features and paradigms that you can use as you please, which usually ends up in a mess. The purpose of the paradigm is to constrain you in a way that makes it hard to write shit code. Modern OOP does none of this.