Exploring the philosophy of objects

forkit forkit at gmail.com
Sat Jun 25 09:29:09 UTC 2022


On Friday, 24 June 2022 at 13:48:35 UTC, Zoadian wrote:
>
> ...
> And to add something to the topic. objects are a great why to 
> think about things. they are, as it turned out, not they great 
> in programming.
> OOP leads to slow, hard to reason about code. it encurages 
> mutable state, spread across the whole programm. it's 
> essentially global variables all over again, just hidden behind 
> a layer of obfuscation.
> It also makes testing a lot harder to actually implement.
> That being said, there are cases where it's ok to use, but imho 
> they are incredibly rare.
>
> - Someone who works on hard realtime systems

I think if we put these claims to the test, they would be found 
wanting.

I'd also love to see, what a non-OOP program would look like, if 
one were completing this assignment, with the use of objects.

Certainly possible, no doubt.

You could do it in C. Hell, you could do it in Assembly. But 
would you?

https://solidsoftware.com.au/Tool/Software/AI/Agents/TrafficAgents.html

That assignment, is minisule, compared to software projects being 
untaken everyday, all around the world.



More information about the Digitalmars-d mailing list