frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Data, objects, and how we're railroaded into poor design (2018)

https://www.tedinski.com/2018/01/23/data-objects-and-being-railroaded-into-misdesign.html
47•dvrp•3h ago

Comments

chuzz•1h ago
Good post, for what is worth Java is slowly and painfully correcting course with features like records and project Valhalla. As with the other language improvements though we will have to live with the tech debt for decades to come…
lmm•1h ago
I've had thoughts along this line for a while. I think Scala does better than this article gives credit for; case classes are a significant step in the right direction, particularly post-Scala 3 (or with Shapeless in Scala 2) where you have many tools available to treat them as records, and you can distinguish practically between case classes (values) and objects with identity even if in theory they're only syntax sugar. It also offers an Erlang-style actor system if you want one.

In my dream language I'd push this further; case classes should not offer any object identity APIs (essentially the whole of java.lang.Object) and not be allowed to contain non-value classes or mutable fields, and maybe objects should be a bit more decoupled from their state. But for now I wouldn't let perfect be the enemy of good.

arethuza•4m ago
"objects should be a bit more decoupled from their state"

Do you mean allowing the "class" of an object to be changed - CLOS can do that. Mind you it's a long time since I wrote any code using CLOS and even then I'm pretty sure I never used change-class.

mcdeltat•55m ago
IMO the nice thing about Erlang and Elixir is their foundation of representing data is rock solid. Because data is fully immutable, you get a lot of nice things "for free" (no shared state, reliable serialisation, etc). And then on top of that you can add your interfacey, mutable-ish design with processes, if you want. But you will never have oddities or edge cases with the underlying data.

In contrast with languages like C++ and Java where things are shakey from the ground up. If you can't get an integer type right (looking at you, boxing, or you, implicit type conversions), the rest of the language will always be compensating. It's another layer of annoyances to deal with. You'll be having a nice day coding and then be forced to remember that int is different to Integer and have to change your design for no good reason.

Perhaps you disagree with Erlang's approach, but at least it's solid and thought-out. I'd take that over the C++ or Java mess in most cases.

high_na_euv•20m ago
I'd say majority of programming languages struggle with elegant, robust and exhaustive check error handling
danieltanfh95•18m ago
clojure exists.
cbsmith•18m ago
I didn't like how this essay misunderstood the design principles in Java's class files. With dynamic binding to the runtime, you can't know for certain the layout of a data structure in memory (e.g. what is the ideal memory alignment?). If the class file is untrusted, you can't even be sure you have a valid data structure in the first place. So allocating the array and then assigning elements one at a time is what you do.
nopurpose•2m ago
So much written about relation between objects and data, but not a single mention of Lisp and derivatives?

Make your vibe coding projects works of art

1•cesargstn•7m ago•0 comments

Living with the face-clawing sloth bear that scares tigers

https://www.bbc.com/future/article/20250805-living-with-the-face-clawing-sloth-bear-that-scares-tigers
1•breve•13m ago•0 comments

Show HN: Back-Weighted DCA Planner – Smarter way to do dollar-cost averaging

https://dcaplanner.com/
1•standew•16m ago•0 comments

Dev Reveals Secrets Behind New "3D" Platformer for the ZX Spectrum

https://www.timeextension.com/news/2025/08/dev-reveals-secrets-behind-stunning-new-3d-platformer-for-the-zx-spectrum
2•Flow•18m ago•0 comments

A Brief Introduction to Ruby

https://www.freecodecamp.org/news/a-brief-introduction-to-ruby/
1•amalinovic•20m ago•0 comments

Web Windows XP Simulator

https://xp.quenq.com/
2•apfsx•20m ago•1 comments

The next unicorn might not hire anyone

https://thenextweb.com/news/rise-of-zero-workforce-startups
1•unripe_syntax•23m ago•0 comments

Agentic Browser Security: Indirect Prompt Injection in Perplexity Comet

https://brave.com/blog/comet-prompt-injection/
1•mihaiplesa•37m ago•0 comments

A New Reality for Terminal Cancer: Longer Lives, with Chronic Uncertainty

https://www.msn.com/en-us/health/other/a-new-reality-for-terminal-cancer-longer-lives-with-chronic-uncertainty/ar-AA1KHnph
1•sharjeelsayed•37m ago•0 comments

Meta Freezes AI Hiring

https://www.reuters.com/business/meta-freezes-ai-hiring-wsj-reports-2025-08-21/
3•01-_-•43m ago•1 comments

Australia Post halts transit shipping to US as 'chaotic' tariff deadline looms

https://www.abc.net.au/news/2025-08-21/australia-post-suspends-transit-shipping-parcels-us-trump-tariff/105680456
11•breve•43m ago•4 comments

Smartphone makers must do more to protect children

https://www.ft.com/content/6abfd672-607b-4e38-ab07-00057d5aebeb
1•01-_-•43m ago•0 comments

Built a tool to control my laptop with just my fingers in the air

https://www.youtube.com/watch?v=VRG1U8Ywmhg
1•techxsarthak•43m ago•0 comments

Print Books Are Target of Pirates on the Web (2009)

https://www.nytimes.com/2009/05/12/technology/internet/12digital.html
1•Michelangelo11•46m ago•0 comments

We archived the GEO Standard – AIVO now defines AI search optimization

https://geostandard.org
1•businessmate•46m ago•1 comments

Show HN: LeRobot Episode Scoring Tool

https://github.com/RoboticsData/score_lerobot_episodes
1•machinelearning•47m ago•0 comments

Best workflow for quick ideation with LLMs from phone

1•ImageXav•49m ago•0 comments

I do not want to install your app

https://beige.party/@maxleibman/114441790730464541
3•Gravityloss•51m ago•0 comments

Steam review from Japan were overwhelmingly negative compared to other languages

https://twitter.com/Shinjisan_XD/status/1957796045506961652oralmosteverygame,thereviewsfromJapanwereoverwhelminglynegativecomparedtoothers.
4•seventhtiger•54m ago•1 comments

Show HN: Database of >2M creators and brands grouped into categories

https://infldb.com/screener
1•druskacik•58m ago•0 comments

For animals, by animals – Anybody building in pets?

1•carcocoa•59m ago•0 comments

Real-time speech to text translation

https://soniox.com/
1•lukax•59m ago•0 comments

Libre-Chip: project for creating Free/Libre CPUs/GPUs and supporting software

https://libre-chip.org/
1•marcodiego•1h ago•0 comments

UGC Maker: Real UGC Ads and Shorts, Made with AI

https://ugcmaker.io/
1•MiaTaylor•1h ago•0 comments

Geojob App

https://www.indiegogo.com/projects/geo-job
1•rrddddd•1h ago•0 comments

DeepSeek v3.1 Just Dropped

https://venturebeat.com/ai/deepseek-v3-1-just-dropped-and-it-might-be-the-most-powerful-open-ai-yet/
4•emrah•1h ago•0 comments

Ask HN: How is your company dealing with the proliferation of AI tools?

1•bradhe•1h ago•1 comments

How to Get Hired at a Top Startup in 2025: The Unfiltered Playbook

https://foundersarehiring.com/career-resources/how-to-get-hired-at-a-top-startup-in-2025-the-unfiltered-playbook
1•niksmac•1h ago•0 comments

Why the Best Candidates Aren't in Big Cities Anymore

https://foundersarehiring.com/career-resources/why-the-best-candidates-arent-in-big-cities-anymore
1•niksmac•1h ago•0 comments

The warning signs AI bubble is about to burst

https://www.telegraph.co.uk/business/2025/08/20/ai-report-triggering-panic-and-fear-on-wall-street/
1•truegoric•1h ago•0 comments