my favs:
-clojure for processing deeply nested data
-rust for general stuff
-java for concurrency support and general stuff
-c for easy pointer manipulation and "tricks"
-sql
-bash for scripting (I'm that weirdo who would rather make a huge shell script rather than using python)
I still need to find something good for arrays/ matrices. MATLAB was kinda fun I can't see it being used in production in anger too easily
There is also Octave, an open-source Matlab alternative, but when I last used it (admittedly quite a while ago) it had limited support for toolboxes (e.g. signal processing). I imagine it has only improved since.
R?
I actually had one hectic weekend porting our whole departments MATLAB code over to Octave due to a hardware failure of our licensing server and some stonewalling from Mathworks, Octave is pretty close to fully MATLAB compatible.
It was transformational in a way my maths teacher was not...
I see a lot of conversation on here dedicated to whether you’d like your data with your functions (objects) or your functions with your data (closures). Rarely see array, logic or constraint programming paradigms mentioned.
FP has been rediscovered again and it’s the hotness right now but it’ll die out again like it did before OO stole its lunch, i can almost write the blog post headlines just now “arity considered harmful”, “OO and side-effect management not mutually exclusive after all!”
I’ve got a fiver on the next big one being a re-visit of structured programming.
God I hope so, probably the worst time I have teaching junior developers is helping those who have only used for-each write a loop with a useful invariant and not a garbage fire of breaks/continues.
Perl on the command line is beautifully concise; it’s easily embedded into CI/CD pipelines because the q, qq, etc escaped quotes; it has best-in-class regex support; calling external utilities equally concise with qx or back-ticks; etc etc.
Personally I tend to favor C/C++ for the main event and Perl for everything else on the systems side.
JavaScript is obviously ubiquitous on the front-end but it feels very clumsy. Not a huge fan of that on the back-end system it’s just too weird to do simple stuff like “parse a file” or “rip through a directory tree” or call a shell command.
I’m sure the Linux kernel community is still using it, but FreeBSD even managed to remove it from the base system.
It’s still ubiquitous… “standard”?
If you're really going to learn a language - as in, build idiomatic programs - its a constantly moving target and requires a lot of effort to maintain.
I think it's better to learn 2-3 languages, and have passing familiarity with others. People like to pretend that language choice solves all your problems, but usually you're talking in percentages: one language is a 80% fit for your problem, another is an 85% fit... there is never a 100% fit - are these differences worth working in a language you barely have any experience in?
Same in reverse btw. Going from C++ to Python is probably easier than Python to C++, but it's still not going to be as easy as, let's say, java -> C# imo.
I guess in the context of your comment this sounds like bragging, but that's not my intent; I'm trying to rebut your comment, using myself as an example, because I think this level of polyglot programming is pretty close to normal, at least after you've been at this stuff for a few decades. Maybe if you're getting into a rut of only knowing 2–3 languages well, you'd benefit from putting more effort into exploration. Unless you're about to stop programming, in which case you won't have time to take advantage of your newfound powers.
I don't think percentages are a good way to think about language fit. I think it's more like an effort multiplier. In theory I can solve any programming problem in C, but when the problem isn't huge and performance isn't much of a challenge, I can usually solve it about with about a tenth of the effort in Python. There are problems where solving them in SQL is about three times easier than in Python, and problems which can barely be solved in SQL, so solving them in Python is about a hundred times easier.
As an example, in my experience it's pretty common for Python to be about half as much effort as Scheme, but there are much better Scheme implementations out there, so when performance is a challenge, solving them in Scheme can be a hundred times easier than solving them in Python. But if you know Scheme and not Python, you can often get twice as much done by learning Python, even for problems where you might say Scheme is a pretty good fit. But it's true that at the beginning, when you have barely any experience in Python, you won't be faster; you'll be slower. And you won't know if that will ever change.
Most commonly, though, people use the language that is best integrated with their chosen platform, because that saves them the effort of writing a bunch of integration code in addition to the actual application code. If you're writing DHTML, for example, use JS, not C. If you need to invoke JVM libraries, reasonable options include Python, JS, Kotlin, Clojure, and Java, but not Perl, C, or C#. If you're writing a Minetest mod, do it in Lua.
So, if you only have more than passing familiarity with 2–3 languages, I think you're going to frequently run into cases where that ignorance costs you a factor of 2 or 3 in effort.
I certainly agree, though, that choosing the right language won't solve all your problems, and it's easy to have exaggerated hopes for it.
You don’t necessarily need a separate language for each domain.
Related: MSAN is made so much better by -fsanitize-memory-track-origins. I can't count how many times MSAN caught an error, and with that flag enabled, it directly pointed to the exact line of code at fault.
Since I enjoy high level programming and the natural experience chicken/egg I never do the low level stuff. Not since Acorn Electron assembler! But I know of it.
EDIT: Do you mean that it lacks certain features without a runtime like Node or the browser? For instance, it doesn't have a language construct for opening files like Python or Ruby. If so, I don't think that's a good argument.
I can't find a domain where JS wouldn't fit the description. While it may be a bad fit for certain problems, it can still be done.
I’m sure I could come up with more. JavaScript is a tool, just like c, go, rust, python, lisps, etc. I’m going to give you the benefit of the doubt and hope you just didn’t consider all of these other domains when you made this comment.
Cheers!
For example: Espruino is a platform for embedded JavaScript.
I just think about it this way: Just because you wouldn't doesn't mean you couldn't
I wonder how much of the horizontal scaling trend is driven by JavaScript's horrible threading story.
The former is a general purpose programing language that favors prototypical object oriented programing paradigm but supports multiple other paradigms such as imperative and functional.
The latter uses the JavaScript language and adds on a bunch of specific APIs (such as the DOM) for specific purposes. This includes APIs for DOM manipulation, playing audio, validating inputs, parsing forms, handling key presses, etc.
In 1998 languages did not have that many features and were in my opinion easier to grasp. Just have a look at modern C++ or Java's cadence of new features.
In 1998 Java and JavaScript were new. Now they evolved into widely adopted general purpose languages.
Your comment reminds me how much i miss dr dobbs journal. I learned so much on those pages.
I started using C/C++ more than 20 years ago and even if I feel really comfortable with the language (except the latest revisions) I am still learning and improving.
I don't think I could achieve the same level of mastery on half a dozen languages.
I'm always surprised by how many people disagree with this; they're on the search for that one language they can use for every task. Or even worse, they think they've found it and their search is over, that's a tragic situation given how spoiled we are for great languages today.
Clojure (STM / refs, vars, atoms & agents), kdb/q (non-loopy array code), Rust (ownership), Go (async done better, although i also really like core.async in clojure too), Python (trio nursery), C++ (asan, msan, tsan).
There's some blogs continually give me good food for thought in this space, all signal no noise:
Eli Bendersky, (every language under the sun) e.g. https://eli.thegreenplace.net/2016/the-expression-problem-an...
Fasterthanli.me (Go, Rust, others) e.g. https://fasterthanli.me/articles/so-you-want-to-live-reload-...
Mechanical Sympathy (Java), defunct but still worth visiting https://mechanical-sympathy.blogspot.com/