pidd wrote: ↑Sat Aug 15, 2020 5:50 pm
What's your weapon of choice? - out of curiosity, not to pull it apart.
After decades of programming in a dozen or more languages, a lot of which are now not only obsolete but unheard of, I have come down to two weapons of choice:
Rust - After a long time using C and C++ it's great to find a language that can do all that without all the footguns. Now we have Rust in our servers, serving up web pages and web sockets, juggling them with NATS messaging and databases. We have Rust in our remote embedded devices collecting data from sensors and such, some of which are Raspberry Pi. Rust is one of the few languages I have ever found that offers genuinely new features that not only incredibly useful but, practically useful. Especially when performance is required. All the type checking and data reference anti-aliasing means you can be very confident that what you build will not crash and burn with hard to find data corruptions.
Javascript - The much maligned JS turns out to be brilliant. It has always had features that other languages are only now starting to to adopt, first class functions, closures, asynchronous programming, etc. And modern JS engines do all that with very good performance unlike many interpreted languages. With JS running under node.js one can do all that web server stuff without all that complexity and chaos of Apache and PHP or whatever. And a lot more. JS is dynamically typed so it's very quick and easy to get a prototype idea working. And allows one to do things that are not even expressible in many other languages.
This is perhaps paradoxical, I love Rust because it is so extremely strict about types and data ownership. I love JS because it so extremely isn't!
Actually I did not understand the comment about " I like the way it developed as a general programming language not just an html feed (because it is not driven by the browser companies)."
Firstly I cannot imagine anyone using PHP as a general programming language. There are so many better options. And PHP is a "Fractal of bad Design":
https://eev.ee/blog/2012/04/09/php-a-fr ... ad-design/. Even if one can put up with that what about performance?
Secondly, it turns out that Rust originates from a browser company, Mozilla, but is for sure intended as a general purpose language. Javascript was of course created by Netscape, now Mozilla, but is also a perfectly good general purpose language outside of the browser. See node.js, Espruino etc.