News for hackers. Stuff that matters.
Re:Python or JavaScript by factorialboy on Wednesday July 15, 2020 @11:46PM (#23855545)
I use both everyday as well. Python is beautiful. Especially if you wrap it with a decent dependency manager like Pipenv.

I have a high level of comfort with JavaScript as well. While I don't keep up with the ecosystem (because it literally changes every few months) I think it's a powerful language to master.

I'm at this age where I don't have favorites. I pick the language suitable for the task.

Re:Python or JavaScript by poletopole on Thursday July 16, 2020 @03:32PM (#23862918)
If I have to choice Python hands down because it can be async but is synchronous by default. But theses days there's Typescript so the choice is harder. I'm actually learning Ruby at the moment and I'm surprised how my perception of it was so wrong, so what I'm saying is it's easy to get the wrong idea at first, but once you dig in, you'll find a bunch of hidden gems in a language no one talks about. These little gems are what collectively makes a language good or not--it's not just one major feature, it comes down to the attention to detail.
Re:Python or JavaScript by throwaway413 on Thursday July 16, 2020 @06:08PM (#23864372)
gem install features --hidden
Re:Python or JavaScript by uberman on Tuesday July 14, 2020 @06:24PM (#23838794)
I code in both almost every day.

While I absolutely hate the look of python (and any language where spacing is significant), I feel like it is easier to get real work done in it.

While I LOVE the look of languages with blocks based on curly braces I find that any significant javascript implementation tends to result in me having to spend a lot of time tending to promises.

So given a 3rd choice I would pick my "GO"-to language one not based on spacing being significant and one where I had more control over when and how I leveraged concurrency.

So in the end, I reluctantly prefer python to javascript.

Re:Python or JavaScript by tcbasche on Thursday July 16, 2020 @02:32AM (#23856408)
Just curious, but why is spacing an issue? Just use an auto-formatter or something. A proper IDE will also have similar tools to fix it for you
Re:Python or JavaScript by catchmeifyoucan on Friday July 17, 2020 @01:46AM (#23867463)
I find it harder to immediately realize and distinguish blocks. I feel that it requires more visual concentration, and if indentation is messed up, then it becomes a dumb tab counting game. Disclaimer: I’m a python beginner
Re:Python or JavaScript by tcbasche on Friday July 17, 2020 @05:50PM (#23876301)
That makes sense. The curly braces do help to identify immediate blocks but I guess the problem is that blocks are too big and can’t be identified in a single screen. Although usually easier said than done
Re:Python or JavaScript by siquick on Thursday July 16, 2020 @09:57PM (#23866160)
They both do different things but complement each other well. It's the libraries, frameworks, and tools that mostly affect the quality of the language for my use cases.

Django and REST Framework are two of the best frameworks I've used in any language, and React (especially now with Functional Components and Hooks)and Vue combined with Tailwind have allowed me to build some really nice interfaces.

Re:Python or JavaScript by speedmagnet on Tuesday July 14, 2020 @06:45PM (#23839017)
I personally prefer javascript even with it's downsides. It's very fast for me to spin up a nodejs express server with sessions/crud API, and I primarily use the async/await style to simplify promise handling. I work with .NET Core apps at my day job but for personal projects I always choose nodejs due to simplicity.
Re:Python or JavaScript by SStanley on Tuesday July 14, 2020 @07:08PM (#23839206)
I feel like you, using both..

For python I like blocks, using semi-colons ':', the fact that i don't have to use parentheses for loops and using print

But I love promises, or the fact that i can use it or not. I like npm and all the packages I can found... etc