...not forgetting RxJs Observables, which I really like! IMO, plain old Javascript is a poor language for writing robust code with, even though I really like it. Typescript is so much better.
Tim
________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of John Yeung <gallium.arsenide@xxxxxxxxx>
Sent: 03 August 2021 21:51
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Go vs. Python vs. Node.js Which to choose?
On Tue, Aug 3, 2021 at 2:27 PM Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx> wrote:
It is versatile as well, able to do any sort of program, and the
language (JavaScript) is very elegant.
Let's just say elegance is highly subjective.
[...] In Node, you have to either deal with "callback hell"
(like you do in browser-based JavaScript) or resolving Promises...
though, honestly, once you get good at Promises they work very well. So
for multi-processing, its hard to beat.
On the other hand, Python is simpler because you don't have to worry
about Promises/Callbacks. It's a bit more clunky for web programming,
writing REST APIs, or other types of server code (unless the server is
very simple or low-volume) than Node.js [...]
I don't mean to go too far down a rabbit hole, especially for people
who are not familiar with callbacks or promises.
I just wanted to clarify that Python does have these things. Maybe the
message is that you don't *have* to use them in Python but you do in
Node.js? (I don't know Node.js well enough to say.)
In Python, the concept behind promises is achieved using different
syntax, known as async/await, which JavaScript now also has. Neither
language had this from the beginning. It was added to Python in 2015
and to JavaScript in 2017.
John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.