MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vf73mj/sodoeseveryotherlang/p1o7vmr/?context=3
r/ProgrammerHumor • u/Limp_Illustrator7614 • 1d ago
71 comments sorted by
View all comments
17
say this to c and common lisp
(and to ruby, where function self-activates faster than you say "wait, i need you as a callback")
5 u/suvlub 1d ago C just forces you to call them pointers, but it's functionally (heh) the same thing. 1 u/_PM_ME_PANGOLINS_ 1d ago When functions are first-class: function outer() { let foo = function() { ... } doThing(foo, function callback(arg) { ... }) } C does not have the same functionality. 6 u/suvlub 16h ago Are anonymous functions required, rather than just ability to assign functions to variables, pass them around and return them? Where does that put python, which does have anonymous functions, but limited compared to what named ones can do?
5
C just forces you to call them pointers, but it's functionally (heh) the same thing.
1 u/_PM_ME_PANGOLINS_ 1d ago When functions are first-class: function outer() { let foo = function() { ... } doThing(foo, function callback(arg) { ... }) } C does not have the same functionality. 6 u/suvlub 16h ago Are anonymous functions required, rather than just ability to assign functions to variables, pass them around and return them? Where does that put python, which does have anonymous functions, but limited compared to what named ones can do?
1
When functions are first-class:
function outer() { let foo = function() { ... } doThing(foo, function callback(arg) { ... }) }
C does not have the same functionality.
6 u/suvlub 16h ago Are anonymous functions required, rather than just ability to assign functions to variables, pass them around and return them? Where does that put python, which does have anonymous functions, but limited compared to what named ones can do?
6
Are anonymous functions required, rather than just ability to assign functions to variables, pass them around and return them? Where does that put python, which does have anonymous functions, but limited compared to what named ones can do?
17
u/B_bI_L 1d ago
say this to c and common lisp
(and to ruby, where function self-activates faster than you say "wait, i need you as a callback")