Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
activitypea
on Nov 7, 2022
|
parent
|
context
|
favorite
| on:
Why would anyone need JavaScript generator functio...
This was killing me when back when I was a Python dev. A "generator" is just a callable object made less reasonable.
throwawaymaths
on Nov 7, 2022
[–]
Even callable objects are kinda brain breaking. I used to joke that the duality of callable objects (and getter/setters, function prototypes in js) were as mysterious as the wave/particle duality in quantum mechanics.
Izkata
on Nov 7, 2022
|
parent
|
next
[–]
I mean, if we're talking python here, functions
are
callable objects.
throwawaymaths
on Nov 7, 2022
|
root
|
parent
|
next
[–]
Good point.
eurasiantiger
on Nov 7, 2022
|
parent
|
prev
[–]
Functions are objects too.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: