Dynamic languages ​​- which one to choose?

Dynamic languages ​​are on the rise, and there are many: for example. Ruby, Groovy, Jython, Scala (static, but has the appearance of a dynamic language), etc. Etc. My experience is programming Java SE and EE, and I want to expand my knowledge of one of these dynamic languages ​​in order to better prepare for the future.

But which dynamic language should focus on learning and why? Which one will be the preferred language in the near future?

+4
source share
12 answers

Learning Ruby or Python (and Scala to a lesser extent) means that you will have highly transferable skills - you can use the Java version, the native version, or the .NET version (IronRuby / IronPython). Groovy is good, but JVM-specific.

Being “better prepared for the future” is difficult if you have not provided for specific scenarios. What do you want to work for? Do you have a project that could usefully be implemented in a dynamic language? Is it enough to try out a couple of them to understand how they differ?

+16
source

Scala is not a dynamic language at all. Type inference does not mean that it is untyped. However, it is a very good language that has a nice combination of OOP and functional programming. The only problem is some errors you encounter along the way.

Since you are already an experienced Java programmer, it will fit well with your skill set. Now, if you want to go at full speed, both Ruby and Python are amazing languages. There is a need for both languages.

+10
source

I would personally recommend Clojure. Clojure is an awesome new language that is becoming popular faster than anything I've ever seen. Clojure is a powerful, simple, and fast Lisp implemented in the JVM. Of course, he has access to all Java libraries, as well as to Scala. This one has a book written about it already, it has matured to version 1.0, and it has three IDE plug-ins in development, all three of which are very convenient.

+8
source

I would look at Scala. Why?

  • It is a JVM language, so you can use your current Java skills.
  • it now has a lot of tool / IDE support (e.g. Intellij will handle Scala projects)
  • he has a functional aspect. Functional languages ​​now seem to be heavily gravitated, and I think this is a paradigm worth exploring in the future.

My (completely subjective) view is that Scala seems to be getting a lot of the attention Groovy got a year or two ago. I am not trying to be controversial here or suggesting that it becomes a better language, but it seems to be the new JVM de jour language.

Aside from the language, which some dynamic attributes is Microsoft F # . I am currently looking at this (and ignoring my own advice, paragraphs 1 and 2 above!). It is a functional language with objects built on .Net, and is currently gaining a lot of attention.

+5
source

In the gaming industry, Lua, if you are an Adobe Lua developer, is also good if you are an embedded programmer. Lua is almost the only easy solution, but if you are learning web development and a general tool, a Python script would be more practical

+4
source

I found that Groovy is a relatively easy jump from the vast Java background - it is a kind of more convenient version of Java. It integrates perfectly with existing Java code if you need to do something.

+4
source

I would recommend Python. It has a huge community and has a mature implementation (along with several promising non-mature ones, just yet). Perl, as I have seen, has lost a lot of traction compared to newer languages, apparently due to its “intuitiveness” (no, do not make me start with this).

When you have done a project or two in Python, move on to something else to get a broader perspective. If you have done several non-trivial things in two different dynamic languages, you will not have problems assimilating any other language.

+3
source

JScript is quite useful, and certainly it is a dynamic language ...

+1
source

If you need a language with a lot of modules (for almost anyone!), Go for Perl . With CPAN, you will always find what you want without reinventing the wheel.

+1
source

I remember your background well, I would recommend a language in which semantics are similar to what you know about. Therefore, a language such as Scala, Fan, Groovy would be a good starting point. When you get envy from the basic semantics of using a functional language (and also start to love it), you can switch to a language like Ruby. The turnaround time for you is thus reduced, as well as the fact that you can move towards being a polyglot programmer.

+1
source

I will vote +1 for Groovy (and Grails). You can introduce a Java or Groovy style yet (you can also mix both and not worry about it). You can also use Java libs.

0
source

As a rule, avoid dynamically typed languages. The loss of compilation check time and the self-documenting nature of strong static typing are worth putting the type information in your source code. If the extra layout that you need to do when writing code is too large, then there may be interest in a language with an output type (Scala, Haskell).

Having information about the type makes the code more readable, and readability should be your number one criterion in coding. It is expensive for a person to read the code; anything that prevents the reader from understanding clearly and accurately is bad. In OO languages, this is even worse because you always make new types. A reader who is just familiar will become a flounder because they don’t know the types that are transmitted and modified. For example, the following is permissible in Groovy: def accountHistoryReport(in, out) Reading, I have no idea what in and out . When you look at 20 different reporting methods that look exactly like that, you can quickly jump over to completely killing.

If you really think you should have non-static typing, then a language like Clojure is a good compromise. Lisp-like languages ​​are built on a small set of key abstractions and a huge number of features for each of the abstractions. So in Clojure I will create a map (hash) that has the attributes of my object. This is a little reductionist, but I won’t need to look at the entire code base to implement some unnamed class.

My rule is that I write scripts in dynamic languages ​​and systems in compiled, statically typed languages.

-1
source

Source: https://habr.com/ru/post/1286669/


All Articles