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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Abstraction, the Anti-Pattern of Computation

1 点作者 RFVenter超过 8 年前

4 条评论

clusmore超过 8 年前
Abstractions hide <i>irrelevant</i> details, heavy emphasis on the word <i>irrelevant</i>. &quot;Abstractions&quot; over relevant details are bad abstractions. Relevant is not an absolute term. Details are relevant or irrelevant in different circumstances, so you can&#x27;t concretely say whether any given abstraction is good or bad - it depends on the context. But given that the details actually are irrelevant, then abstractions <i>improve</i> clarity, not detract from it, because you are not hiding any information that would help to clarify.<p>My favourite example is navigational directions. If you ask me for directions to a particular building, I could say &quot;It&#x27;s the building on the left of the XYZ building in the city.&quot; If you know where the XYZ building in the city is, this is very clear and concise. It&#x27;s much better than if I had instead said &quot;Okay well from here, go North for 100m, then turn left, then continue going straight for 1km, then turn right, ...&quot; If you don&#x27;t know where the XYZ building is, the latter directions are more helpful.
jonny_storm超过 8 年前
In mathematics, abstraction is little more than substitution. This is what Wittgenstein was referring to when he said all logical propositions are tautologies--that all abstract notions can be reduced to compound statements containing what he called atomic facts.<p>&quot;Abstract&quot; needn&#x27;t mean &quot;vague&quot; or &quot;fuzzy.&quot; Consider your favorite high-level language, which necessarily compiles to machine code. The abstraction introduced by the high-level language corresponds precisely (for a target architecture) to a set of instructions that perform the intended function. That it does not do so <i>uniquely</i> is another matter, and perhaps this is the sort of gap you are (understandably) concerned about.<p>The argument that abstraction is inherently bad is demonstrably false. (If I&#x27;ve inadvertently constructed a strawman, I apologize, but that did seem to be the argument put forth.) Must I understand the computations--and they are computations!--occurring at the sub-atomic level to write a program? Certainly not.<p>Indeed, I claim there is a limit to the amount of raw information we can process effectively. Further, I claim that familiarity with a system or concept correlates with the amount of irrelevant information we can effectively categorize and ignore. I won&#x27;t support these here, but I think they are reasonable, if imprecise.<p>Perhaps, then, the right amount of knowledge is the right amount of knowledge. At least some limited understanding of quantum physics is necessary to program a quantum computer, or a simulation of one, but my failure to write a correct or easily understood program need not precipitate replacing code with gates or something similarly tedious. Likewise, doing away with subclasses or generics or functions or structured programming constructs seems more an instance of throwing the baby out with the bathwater--possibly for the wrong reasons in the first place.<p>Tangentially, there&#x27;s a wonderful correspondence between symbolic substitution and proof reduction that Phil Wadler explains in his paper &quot;Propositions as Types,&quot; and there&#x27;s a great talk he gives on the same. Here, abstraction is more or less the opposite of beta-reduction, which is just substitution, all of which is gloriously precise.<p>Wall of text aside, if the post&#x27;s thesis was merely, &quot;We should be more careful,&quot; then I could not agree more.
atom-x超过 8 年前
I tried, but the article lost my interest after several typos and terrible usage of bold + italic, which makes it mostly unreadable.
flukus超过 8 年前
I wish that was the level of abstraction I have to deal with. Instead there&#x27;s another 17 layers spanning multiple servers filled with &quot;business logic&quot;.