MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/4eebef/easy_javascript_game_loop/d1zod5f/?context=9999
r/shittyprogramming • u/MC_Labs15 • Apr 12 '16
37 comments sorted by
View all comments
28
I forget, does javascript have tail call recursion?
27 u/MC_Labs15 Apr 12 '16 This particular code will throw an error 9 u/auxiliary-character Apr 12 '16 Yeah, even if javascript has tail call recursion, they're not using return statements at the end. 3 u/Niriel Apr 12 '16 Does JavaScript have a Bottom type? That's the only return type that makes sense for an infinite loop, since it's uninhabited. 4 u/Darksonn Apr 12 '16 No, but they don't have return types either, so it's fine. 4 u/Niriel Apr 12 '16 They don't have a return value, but they do have a return type. Bottom is a type with no value. https://en.m.wikipedia.org/wiki/Bottom_type 6 u/whatIsThisBullCrap Apr 12 '16 Javascript is dynamically and weakly typed. It doesn't matter what the type is 1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
27
This particular code will throw an error
9 u/auxiliary-character Apr 12 '16 Yeah, even if javascript has tail call recursion, they're not using return statements at the end. 3 u/Niriel Apr 12 '16 Does JavaScript have a Bottom type? That's the only return type that makes sense for an infinite loop, since it's uninhabited. 4 u/Darksonn Apr 12 '16 No, but they don't have return types either, so it's fine. 4 u/Niriel Apr 12 '16 They don't have a return value, but they do have a return type. Bottom is a type with no value. https://en.m.wikipedia.org/wiki/Bottom_type 6 u/whatIsThisBullCrap Apr 12 '16 Javascript is dynamically and weakly typed. It doesn't matter what the type is 1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
9
Yeah, even if javascript has tail call recursion, they're not using return statements at the end.
3 u/Niriel Apr 12 '16 Does JavaScript have a Bottom type? That's the only return type that makes sense for an infinite loop, since it's uninhabited. 4 u/Darksonn Apr 12 '16 No, but they don't have return types either, so it's fine. 4 u/Niriel Apr 12 '16 They don't have a return value, but they do have a return type. Bottom is a type with no value. https://en.m.wikipedia.org/wiki/Bottom_type 6 u/whatIsThisBullCrap Apr 12 '16 Javascript is dynamically and weakly typed. It doesn't matter what the type is 1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
3
Does JavaScript have a Bottom type? That's the only return type that makes sense for an infinite loop, since it's uninhabited.
4 u/Darksonn Apr 12 '16 No, but they don't have return types either, so it's fine. 4 u/Niriel Apr 12 '16 They don't have a return value, but they do have a return type. Bottom is a type with no value. https://en.m.wikipedia.org/wiki/Bottom_type 6 u/whatIsThisBullCrap Apr 12 '16 Javascript is dynamically and weakly typed. It doesn't matter what the type is 1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
4
No, but they don't have return types either, so it's fine.
4 u/Niriel Apr 12 '16 They don't have a return value, but they do have a return type. Bottom is a type with no value. https://en.m.wikipedia.org/wiki/Bottom_type 6 u/whatIsThisBullCrap Apr 12 '16 Javascript is dynamically and weakly typed. It doesn't matter what the type is 1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
They don't have a return value, but they do have a return type. Bottom is a type with no value. https://en.m.wikipedia.org/wiki/Bottom_type
6 u/whatIsThisBullCrap Apr 12 '16 Javascript is dynamically and weakly typed. It doesn't matter what the type is 1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
6
Javascript is dynamically and weakly typed. It doesn't matter what the type is
1 u/BobFloss Apr 12 '16 Yes it does. 2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
1
Yes it does.
2 u/whatIsThisBullCrap Apr 13 '16 Oh ok
2
Oh ok
28
u/auxiliary-character Apr 12 '16
I forget, does javascript have tail call recursion?