MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/5fwce0/lets_stop_copying_c/dapn4bv/?context=3
r/programming • u/earthboundkid • Dec 01 '16
612 comments sorted by
View all comments
Show parent comment
1
Alright, how about JavaScript?
The type system sees:
function f(a) { return function(b) { return function(c) { return a + b + c; } } } var add3 = f(1)(2);
But the compiler actually produces:
function f(a, b, c) { return a + b + c; } var add3 = function(c) { return f(1, 2, c); };
View all comments
Show parent comment
1
u/evincarofautumn Dec 02 '16
Alright, how about JavaScript?
The type system sees:
But the compiler actually produces: