loading...

re: How I chose a programming language and beat bad habits VIEW POST

FULL DISCUSSION
 

Hmm.
I think you are missing something in this process.
You ended up selecting languages that are the very top in meeting each individual objective, and pretty much had to sacrifice one or two objectives after tallying the points.
However, there is a better choice I think, a choice that does well-to-excellent on all of your objectives: JavaScript.
0- Like python, JS is dynamiclly typed and relatively easy to learn.
1- desktop apps : electron (like atom, slack) and others.(probably it's weakest here, but still not too bad at all, and we are putting everything on the web nowadays anyhow)
2- plenty of android/iOS frameworks.
3- king of the web : solid eco system for backend(nodejs) , and the only one in frontend (react, angular,vue...etc). Full stack: MEAN, MERN stacks..
4- also has tons of frameworks to build games/highly interactive content. Also webgl...etc
5- plenty of JavaScript jobs everywhere for the above reasons.

Nonetheless, the language itself is hardly the major part here, it's the frameworks/libraries and ecosystem.

These are just my two cents.

 

Just because you can doesn't mean you should.

JS is quite poor choice for games, except if you're working on something simple. Electron is a huge memory hog and there are much better solution for desktop application development in pretty much any other language (JavaFX, Qt, Gtk etc).

 

I hate it that electron apps (skype, teams, vscode, slack) always wake up my CPU even when I do nothing and even when they run on the background. Not sure whether it has to do with electron but I‘m sensing a pattern here. It’s really important for me because I use laptop for work and i feel that running these apps even in background has been draining my battery quite a bit.

 

Thanks for your reply! All good points! I updated my post to be more clear with the issue I and others get stuck in.

 

As much as I hate JS and its 'ecosystem' I have to agree with you.
That said I can't wait to have WASM working properly so we'll finally be able to use any language we want for the web.

 

Agreed, WASM is the only good thing that has given me hope for the future of web tech

 

IMO you can already do that, you run any language you want on a server and you AJAX data to the front end. I do not think WASM will change that, it just replaces some AJAX. Currently, WASM can not modify DOM so you will still use JS. You pass input to WASM and you get back output. It basically moved some server logic to the frontend.

Not really: you can create language-specific libraries that then do call Javascript for DOM operations and allow you to register callbacks.
After that you can use, for example, your language decent type management, decent inheritance support, good standard library to write complex interfaces much more easily than with a language where 1+'1' is '11' but 1 - '1' is 0, has undefined, your best object extension option is to use a mixin and where you need to import half a million files to avoid reinventing the wheel... ;-)

I am super interested in WASM but just playing devil's advocate here. I also think we could do away with the DOM and simply render in WebGL. Are you doing something in WASM already? Any language preferences there? I am considering Rust.

I've seen some examples in Rust (using a library for very basic DOM manipulation) and tried Mozilla's Python "notebook" environment Pyodide.
I'm also experimenting a bit with Transcrypt Python-to-JS transpiler, but nothing is going to production soon (real work or games)

 

If my recommended news is to be believed, you should learn Deno rather than node now

code of conduct - report abuse