Events vs Function Calls

The cluster centers on debates about event-based programming versus alternatives like direct function calls or channels, particularly in frontend development, web components, and UI handling, with discussions on benefits, drawbacks, and applicability.

➡️ Stable 0.6x Web Development
2,937
Comments
19
Years Active
5
Top Authors
#4349
Topic ID

Activity Over Time

2008
18
2009
58
2010
55
2011
131
2012
214
2013
211
2014
229
2015
183
2016
189
2017
209
2018
155
2019
131
2020
160
2021
167
2022
192
2023
209
2024
205
2025
209
2026
14

Keywords

tricks.com Node.js JS GUI DSA ID OOP glebbahmutov.com OS SOP event events handlers observers binding pointer js fn handler instead

Sample Comments

Ygg2 Jul 26, 2021 View on HN

Interesting. Why function calls over events? And is it always applicable?

eddythompson80 Jun 30, 2025 View on HN

I want it and I want it now. Screw your event based system

joomy Jan 17, 2026 View on HN

It would actually be a good fit for event handlers...

gfodor Jun 29, 2013 View on HN

Can someone explain the benefits of channels vs event handlers for frontend development in a non-abstract way like I'm five?

__ryan__ Apr 4, 2022 View on HN

You think being event based is holding back a web component library? When the DOM is event based now?

sushshshsh Aug 11, 2020 View on HN

Sounds like they haven't figured out event driven architecture yet ^.^

lionelw Aug 19, 2025 View on HN

When is it ever necessary to change event handlers?

mercurial Dec 18, 2015 View on HN

This sounds like an interesting approach, though I'm not really fan of events (it's easy to see when they fire, but less easy to make sure anything is listening).

oomkiller Jan 31, 2012 View on HN

This is probably a little bit late for this release, but have you ever considered allowing arrays or strings with spaces on the value side of the events hash? This would allow you to define different functions to call in order when an event is fired, instead of just a single function that has to call them itself. I've run into a few situations where this would be useful, and seems like a very small change. Should I send a pull request?

arvinsim Sep 15, 2017 View on HN

I guess you weren't dependent on Synthetic events then.