It’s not a magic bullet. But what you learn can be used in other languages, especially things like Map, Filter, and Reduce.
I totally recommend experimenting with Clojure or Haskell and implementing a project with a pure approach & immutable binding, or as much as you can.
If Java is a tuba, then maybe Python is a trumpet. They're two very different instruments, but they share a lot of the same underlying intuitions. In fact, I would say that C-style languages are probably equivalent to the collection of brass instruments. There are major variations from trombones to trumpets to french-horns, but not as large as you'd think.
So if you've only played tuba, what happens when somebody hands you a violin? You may understand "music theory" (or computer science) pretty well, but actually sitting down to learn the violin will give you strange insights that aren't apparent on brass instruments. For instance, violins' strings are tuned perfect-fifths apart -- certain scale patterns naturally jump out at you. In the same way, let's compare Haskell/Idris/R to stringed-instruments. It's easy to switch between them when you realize that a viola is a cello is an upside-down bass-guitar. And at a higher level, learning violin and tuba together will make you better at BOTH instruments! As a bonus, playing music is more fun when you can antipate the habits and difficulties of your peers' instruments.
As a side-note, I think Lisp is either a piano or a theremin. I'm not sure why.
Anyway, I think learning each "family" of languages is a worthy aim for every engineer. Here are the groups that I personally hope to master over my lifetime:
- Hard : Assembly
- C-Like : C, Java, Python, JS, PHP, etc.
- Pure Fun : Haskell, Idris, OCaml, Elm, etc.
- Distributed : Erlang, Elixir
- OO : Smalltalk
- Lispy : Scheme, CL, Clojure
- Stringy : BASH, Perl, SNOBOL
- Code-Golfy : APL, J, K, AntLang
- Stacky : Forth, Joy
- Data-Driven : R, Mathematica, Wolfram Language
- Logic-Driven : Prolog
This list is long, but don't let it discourage you! Every family has plenty of magical ideas that make the next one easier to master.Best of luck on your journey!
In addition almost everything that is easy in Perl 5 is also easy in Perl 6, but it also makes a wide variety of additional things easy. For example there is are several meta operators for dealing with lists.
(1,2,3) Z+ (10,20,30); # (11, 22, 33)
[Z+] ( (1,2,3), (10,20,30), (100,200,300) ); # (111, 222, 333)
[Z*] (1,2,3,4,5), ( 10 xx Inf ), ( i xx Inf ); # (0+10i, 0+20i, 0+30i, 0+40i, 0+50i)
((1,1),(2,2),(3,3)) «+» ((40,50,60),)
# ((41, 51, 61), (42, 52, 62), (43, 53, 63))
So it has a lot in common with data-driven languages.There are also features which you might expect to see in a distributed language.
Basically if there is a choice between A and B, Perl tends to choose both. With Perl 6 doing this to a greater extent than previous Perls.
Of course you are. Everyone is.
There are maybe 100 different language/style/technique boxes you could check. You might be able to check three. You look around here, and you see that, for every box, there is someone here who can check it. But no one person here can check more than 20 at most, maybe no more than 10.
Don't look at the entire site and feel inadequate. Don't even look at some of the people who have 40 years experience and feel inadequate.
But yes, as others said, look to learn things that are different from what you know.
MIPS(how processor works),
C(how memory, pointers and syscalls work),
Ruby(fully object oriented),
Scheme(simplicity, composion, code-as-data),
Haskell(abstractions, side-effects management, immutability, types, FRP),
Erlang(distributed & concurent programming, message based communication, immutability),
Prolog(logic programming).
Every od these feels differently and operates at differently level of thought and abstraction.
It's good to just get the feeling of these languages as it will give you better perspective.
I tested a lot more but these I can recommend for expanding horizons.
EDIT: formatting
Lisp is not a pure functional language, by the way. It's very multi-paradigm and has one the best object and exception systems ever designed. Not only are all these excellent features available to you, but they are available to you at the metalevel as well.