TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What's the Point of OOP? (2008)

2 点作者 reqo10 个月前

2 条评论

BobbyTables210 个月前
I feel associating methods to data is very good in terms of reducing scope (avoids every function being global) and developer convenience.<p>But when people glorify OOP, they are usually focused on highlighting polymorphism — and that is when the “king has no clothes”.<p>Outside somewhat narrow usecases, polymorphism is often overrated. Even when functionally possible in OOP, there could be huge performance impacts of a simple change like changing an array to linked list.<p>The “traits” approach used in Rust (and others) is much more practical.
pipeline_peak10 个月前
Reusability kind of sucks when it’s hard to test.<p>With my team, any code we touch, the parent callers need to be regression tested.<p>It gets to a point where simply copying and pasting code then refactoring is the better way.