TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Objects Are Not Abstract Data Types

21 pointsby bgrayover 15 years ago

2 comments

gprisamentover 15 years ago
"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 未加载
lmkgover 15 years ago
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 未加载