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

> [Python] being the number one preferred scripting language on planet earth

Is it?

I'd imagine JavaScript usage/execution is probably way way higher.




Yes python is more preferred when choosing a scripting language and javascript is more executed in browsers. And the two do not contradict.


I think you're both correct. For sysadmin definition of scripting, python would be most popular. For the 'fast to write' definition of scripting then sure, JavaScript.


I don't think I've ever heard that as a definition of "scripting".


Which one?

For the second, the definition of 'scripting language' used to be 'doesn't use a compiler' but JS and everything else has a JIT now, so 'make something quick' is a modern equivalent.


But people don't use javascript to write scripts. Javascript is mostly used in writing web services.


I mostly write javascript now for my day job... But python is nicer for scripts... The asynchronous nature of node makes it a pain for me


Async/await largely solves that though.


To an extent... If you're using something that supports promises and not callbacks, which not all of the things you want to use to write an actual script do.


You can easily transform a callback into a promise via simple glue-functions:

    let result = await CallbackPromise.from(some.callbackConventionFunction, param);
Then you get a unified form for the code-base.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: