3 ms·
Yeah, especially because Coffeescript can be very liberal with creating objects if you don't know exactly what you (and coffeescript) are doing. edit: Disclaim
by mAritz 13y ago
Yeah, especially because Coffeescript can be very liberal with creating objects if you don't know exactly what you (and coffeescript) are doing.
edit: Disclaimer: I have written and am still occasionally writing canvas rendering stuff in coffeescript and after some meddling around with some annoying bits it has been quite pleasant. For example you should make sure that functions that don't need to return anything, return false or null or undefined. Otherwise coffeescript will return whatever your last statement evaluates to. This is especially bad if the last thing is a loop.
- Zr40 13y agoCoffeeScript doesn't actually create any objects you're not telling it to do so. It does return the value of the final expression, but you placed that expression there to be executed. Its value will be returned and that might cause it to remain reachable for some additional time, but the value was created by your expression, not by CoffeeScript's return semantics.