3 ms·
> only a very small fraction of code written in Java, C#, or any other high-level OOL does dynamic code generation, or even reflection The overall fraction mig
by Const-me 10y ago
> only a very small fraction of code written in Java, C#, or any other high-level OOL does dynamic code generation, or even reflection
The overall fraction might be small, however vast majority of software still contain substantial amount of code that does. Most serialization and DB access libraries do. For C#, this includes all framework-provided serializers (XML, data contract, etc.), the ubiquitous Json.NET, and my own one: https://github.com/Const-me/EsentSerialize https://github.com/Const-me/EsentSerialize
> OOP doesn't allow people to reason about complex systems
Respectfully disagree, ‘coz I have never saw complex systems that aren’t OOP. Even most compilers are OOP, take a look: https://github.com/llvm-mirror/llvm https://github.com/llvm-mirror/llvm https://github.com/gcc-mirror/gcc/tree/master/gcc https://github.com/gcc-mirror/gcc/tree/master/gcc https://github.com/dotnet/roslyn https://github.com/dotnet/roslyn
> An object can contain references to any other object held by the process
This is true for very small class of objects, like GUI controls with loosely typed event handlers, or objects that hold lambdas/functions that may capture anything at all (but the latter is not strictly OOP).
An object can only reference other objects of types that can be stored in its properties/fields. For many objects especially simple lower-level ones, this means objects can reference no other objects at all.
> have never seen an OOP code base less than 10x the complexity of the business problem it was built to solve
My guess is, you’re systematically underestimating complexity of the business problems solved by the code you look at.
- javajosh 10y agoMost of my career has been spent building stateless web applications over relational databases in Java. About half enterprise, and half consumer facing internet. Sometimes using Hibernate, sometimes using JDBI, sometimes leaning heavily on SPs. Sometimes generating HTML, and sometimes exposing REST-like API. The various runtime accoutrements of this architecture, like caches, queues, health-checks, proxies, linux, etc are quite familiar to me. My time as a freelancer gave me particularly broad appreciation of real world solutions. In every case, codebase complexity was dominated by administrative overhead. My passing experience with apps written in C#, ASP, and PHP, tell me that it is the same story there, too. This is my subjective view. One way you might understand my perspective (and perhaps even share it, to some degree) is to consider the act of adding a column to a database table, and how a typical OOP/RDB webapp codebase must change to incorporate a new DB value. (And this is only the tip of the iceberg, since usually adding a feature requires a view, an index or two, plus column and table changes.)
- Const-me 10y agoI’m a full-time developer since 2000. Over those 17 years, I only briefly did web development, Java or relational databases. Mostly I’ve been doing system programming, game development, embedded development, robotics. When I did networking, it was usually lower level than REST. I have minimal experience with proxies and linux, I’m mostly a Windows developer. Lately I’m working on Windows desktop software, the area is CAD/CAM. As you see, almost nothing common with your background. For the kind of software I work on, if the code is 10x more complex than necessary, the software might fail the performance targets. Complex code is also prohibitively harder to maintain and debug. And esp.in embedded, quality requirements are just higher: web requests come and go, but embedded software needs to reliably work for days without restarts. I think the reason why I’m generally OK with other people’s OOP-style code I see in the projects I work on, is that code is just better then what’s in an average web.app. Especially if the web app ain’t Google or Facebook, AFAIK for these guys, software quality translates to substantial saving on electric bills.