πŸ’¬ Reply by PeriodicallyPedantic

2024-11-15 πŸ”„ programmerhumor ┃ RE: ReversalHatchery

Why did you even bring up AI?
IDEs have been able to generate equality functions for decades without AI.
It’s kinda neat to have this defined directly in the language so that compilers can implement it, but creating equality function is so low effort that this doesn’t really seem like a big deal.
Like, you define the members in a class, then you tell your IDE to generate getters, constructor, equals, hashcode, etc all in like 5 seconds.
I like it, it’s nice when the language itself defines reasonable defaults for things, but realistically you’re saving yourself a few seconds of effort.

PeriodicallyPedantic

ReversalHatchery

πŸ”„ programmerhumor

πŸ’¬ Replies

2024-11-16 ReversalHatchery ┃ edited ┃ 1πŸ’¬

I thought you were thinking an AI based code generator klike copilot) does it, when you said the IDE does it.
username checks out /s

2024-11-15 words_number ┃ 1πŸ’¬

Isn’t it obvious? More code to skim, scroll over and maintain if something changes. If you add a struct field, your manual EQ implementation still compiles and seems to work but is wrong and […]

2024-11-15 shy_mia ┃ 1πŸ’¬

Yeah but if the class changes you need to update everything, you got all that boilerplate taking up space for no real reason, etc…
The Rust way’s just a lot cleaner imo.

────

View parent post

View first post in thread

View thread

────

πŸ“‘ Local feed

πŸ•οΈ Communities

πŸ”₯ Hashtags

πŸ”Ž Search posts

πŸ”‘ Sign in

πŸ“Š Status

πŸ›Ÿ Help