I took the code for my Node.js server and converted it to CoffeeScript, then I tried it on Heroku. It crashes when it receives a long JSON string, whereas the original version handles it without any problem. Is this normal?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d say writing in CoffeeScript is (potentially) much more reliable than writing pure JavaScript.
From CoffeeScript’s documentation:
CoffeeScript:
Generated JavaScript:
I don’t know about you, but I usually forget to check the type against
function, or otherwise am too lazy to considernullorundefined. Besides, it makes JavaScript code much uglier and harder to read and maintain.It’s certainly a bug in you poring your app. Make sure you understand and exploit what
do(i){},for key, value of hash,for item,index in array. Explicitlyreturnat the end of functions, and double check variable scopes. I’m sure you’ll find that it was a bug in your port (as did I, a few weeks back).