Classes Usage Debate

Discussions revolve around the necessity, benefits, and alternatives to using classes in programming, often criticizing overuse in favor of functions, structs, closures, or namespaces.

📉 Falling 0.3x Programming Languages
3,434
Comments
20
Years Active
5
Top Authors
#2930
Topic ID

Activity Over Time

2007
7
2008
26
2009
51
2010
86
2011
102
2012
197
2013
160
2014
164
2015
171
2016
150
2017
255
2018
193
2019
238
2020
323
2021
298
2022
330
2023
323
2024
161
2025
191
2026
8

Keywords

OO AFAIK AIC JS OOP ORM FIFO DirectoryInfo ycombinator.com wikipedia.org classes class oop oo functions foo write objects data code

Sample Comments

Shorel Aug 1, 2013 View on HN

Because classes are the poor man's closures?

equinusocio May 18, 2020 View on HN

You should use thing for what they're made for. Even using classes you can't solve the problem you're describing.

3rdAccount Jul 12, 2018 View on HN

Because you at least don't have to write classes for everything? :)

omegbule Mar 8, 2017 View on HN

There isn't really a need for classes...

ehutch79 Jan 28, 2021 View on HN

Isn't that just reinventing classes?

camus2 Mar 11, 2014 View on HN

well, having classes helps not to ask oneself how to write classes.

cperciva Apr 7, 2011 View on HN

Why write C-with-classes if you can just write C-with-structures-and-function-pointers instead?

netdevphoenix Apr 4, 2025 View on HN

You can use classes without doing OOP and you can do OOP without using classes

ubercow13 Nov 25, 2018 View on HN

How's that any different to a 'classical OOP' approach?

mk81 May 1, 2021 View on HN

Implying to impressionable minds that a function can't exist without a class.