Hacker News new | past | comments | ask | show | jobs | submit login

This is a really neat idea, and I'm definitely going to look into this more when I have time, but I have a small nit to pick.

print(...) is a common debugging, or output call in python, and I can see how in many use cases that would translate to console.log in javascript.

However, some browsers don't support console.log, and in serverside javascript, objects like console and window are not available. I don't know of any common output technique that would work in all browsers as well as with node.js and ringo. Depending on how much you care about supporting serverside js and different browsers, this may be a non-issue.




Thanks. I'll change

  pj.transformations.special.Call_print
to have the emitted code check if you've defined a print function, using console.log only if you haven't.

  ((typeof print !== "undefined" && print !== null) || console.log)(...)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: