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.

Semantic compression (2014)

79 pointsby noob_engalmost 2 years ago

13 comments

davidmurdochalmost 2 years ago
The intro has nothing to do with the rest of the article, really. The author claims it does at the end, but it&#x27;s just trashing OOP for fun (the author even says this).<p>OOP is fine. And DRY (what the core idea of the article is getting at) applies in OOP paradigms as much any another. The arguments the author makes are orthogonal to OOP.<p>The author seems to not enjoy planning before writing code, which I guess is more necessary for OOP than other paradigms?
评论 #36459534 未加载
kubbalmost 2 years ago
It&#x27;s really weird when the blogger assumes they know exactly what I do and think, here that I think of a class hierarchy as the first thing when writing a C++ program.<p>I suppose they&#x27;re going for the &quot;wow, are you God?&quot; effect, but when it&#x27;s a miss, it just makes them look silly.
评论 #36460068 未加载
评论 #36459924 未加载
debanjan16almost 2 years ago
I was actually in the school of thought that this article describes until I read and worked through the book <i>How to Design Programs</i> [0]. The rest is upto you to judge.<p>[0] <a href="https:&#x2F;&#x2F;htdp.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;htdp.org&#x2F;</a><p>Edit: I would love others, who have read the above mentioned book, to weigh in with your anecdotes.
评论 #36459196 未加载
uzerfcwnalmost 2 years ago
A page-long strawman isn&#x27;t a great way to start an article. I also disagree with the author&#x27;s claim that refactoring is ridiculous or different, but like the author I&#x27;m not going to elaborate.
评论 #36458197 未加载
PoignardAzuralmost 2 years ago
Semantic compression is such a cool shorthand.<p>This article really helped me put things I had believed for years into words when I first read it. It&#x27;s pretty amazing.
评论 #36482293 未加载
BaculumMeumEstalmost 2 years ago
The introduction describes encountering awkwardness during modeling in OOP, which definitely does happen. But I’m not convinced that a payroll system written in C++ in the style described by the post is going to be a better solution.
Jtsummersalmost 2 years ago
This is from 2014 (it felt awfully familiar when it got to the code samples) but submitted under the title &quot;Semantic Compression&quot; or other variations:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17090319">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17090319</a> - May 17, 2018 (41 comments)<p>There are others with 1-2 comments but no other discussions beyond that that I can find.
badtensionalmost 2 years ago
How&#x27;s this different from just refactoring? Why the fancy name?
评论 #36457954 未加载
评论 #36457495 未加载
soItGoesAgainalmost 2 years ago
I think semantic compression is achieved by using a denser more expressive language, some languages can express the same activity in far fewer lines of code. Personally I find the denser code, harder to read, which I think also makes sense, since it contains more meaning in less space. If you are writing code, perhaps in python, and you keep following your editors instructions to refactor it, you end up with far fewer repeated lines of code, and lots of small reused functions, you are actually doing manual code compression. I have always wondered why, if editors are so smart, they don&#x27;t have a &#x27;compress this project&#x27; button, which does all that for you.
评论 #36459258 未加载
hyperhelloalmost 2 years ago
All he wanted to do was have some buttons that react to the mouse and run code. At this point, such a thing should be a language primitive like floating point.
pacifikaalmost 2 years ago
Jargon abstraction
mcdonjealmost 2 years ago
TL;DR: DRY<p>Nice read, though. Very approachable.
评论 #36459224 未加载
ilakshalmost 2 years ago
So I guess he thinks that classes are great as long as there is never any inheritance? And so if you do that then it doesn&#x27;t count as object oriented programming or something. Especially if you give it a new name like &quot;semantic compression&quot;. Lol.<p>I think the newish thing is traits such as in Rust.
评论 #36460077 未加载
评论 #36461453 未加载