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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Objects Are Not Abstract Data Types

21 点作者 bgray超过 15 年前

2 条评论

gprisament超过 15 年前
"Object-oriented languages, Liskov said, tend to conflate the concrete representation of a type with the interface used to access it."<p>This is why I prefer C to C++. An opaque data type in C has a clean separation of the interface from the implementation. C++ classes tend to have both methods and implementation-dependent data specified in a single file. Granted, one can write good or bad code in any language, but I've found C encourages good behavior in this regard more than C++.
评论 #1054224 未加载
lmkg超过 15 年前
What are the similarities and differences between working with a CLU-type type/cluster separation for fields and methods, and a CLOS-style multi-method approach, which has methods and generics standing free from objects and classes? It seems like CLU follows a more traditional single-dispatch paradigm, with the fields and the methods in different layers but bundled together, while CLOS separates the methods not just from the fields but from everything. But I haven't worked with either, so I'm just guessing. Can anyone comment from experience?
评论 #1054167 未加载