Suggestions on which language to learn next?

As someone who knows PHP and JavaScript to a reasonable level (I’m familiar with Python and Java in passing), I’m looking to learn another language that will both expand my horizons as a programmer and be useful to my career. Ideally not another scripting language, as I’d like to learn something that is useful for the sorts of things that PHP isn’t. Lately, I’ve seen both Clojure and Go recommended as good languages to learn, but I’m interested in getting more (and alternative) opinions.

@mawburn I’d be especially interested in getting your opinion on this, as I know you’ve said you work with other languages such as Scala.

Are you trying to complement your existing skillset or go a whole new direction?

I’d be interested to hear suggestions either way - my primary reason for wanting to learn another language is to broaden my perspective and avoid being stuck in a rut of always thinking in terms of PHP and the problems that it is suited to solving (if all you have is a hammer, everything looks like a nail etc), but if it’s also useful to my work in some way, like it could be useful in building back-end web services, then that’s a bonus.

Scala was weird, I personally didn’t like it. It solved a lot of problems, but introduced a few more. Though, I think having even minimal exposure to functional programming was good. It makes your mind approach problems differently. I have actually not heard much from it in the last year or so since Java 8 was released and 9 is on it’s way. Both of these versions have updated enough to address some of the shortcomings of Java that made a lot of people switch to Scala in the first place.

Clojure is also functional and both it and Scala run on the JVM. I’ve never touched Clojure though, but have heard good things. I think the amount of parenthesis scares me. :smile:

Personally, I’d suggest getting familiar with Java or C# and hit a trifecta of popular languages. Between either of these 2 and PHP and JS, you’ve pretty much hit all the major stuff for web.

Java can be a bit harder to step in to because of the huge enterprise community and the sheer amount of knowledge you need to start something basic. But you can use the Play Framework which is Java or Scala and built as a combination of Rails and ASP.Net’s MVC Framework and pretty easy to pick up. Or Jersey, which is a RESTful framework and little more enterprisey, but not that hard to get up and running. Or Spring, which is the go to framework for most Java web apps, but also the most complicated. All 3 of these are a huge step forward from the old entprise frameworks like J2EE/JEE or Struts and the Java community is currently going under a shift in mentality away from these to more modern methods.

That said, .NET also has a functional language called F#. I know next to nothing about it though other than it can be mixed with other .NET languages and use their libraries natively, similar to how Scala works with Java.

With Microsoft also going under a transition to be more platform independent, I can really see C# and .NET growing a lot in the near future. C# was designed to be a better Java and has matured to actually be a better Java, it’s just still (mostly) constrained to Windows. And from the sound of it, it seems like MS is making moves towards attacking the platform independence of Java as well.

1 Like

I’d suggest .NET (specifically C#), but I’d encourage you to wait another learn so that it is in a better state to be used on multiple environments. I know they’ve made huge progress in allowing it to run on Linux, but I’m certain a year from now will be even better.

I’m in the process of trying to get a better handle on Ruby and Ruby on Rails (and Ember). There are just SOOO many aspects to them that makes it a bit difficult. As most of the projects I’m trying to learn from use multiple gems and so identifying what is pure Ruby, what is driven from a gem, etc. can be frustrating

1 Like

Try Prolog

https://bernardopires.com/2013/10/try-logic-programming-a-gentle-introduction-to-prolog/

@John_Betong Hmm, I’d heard of Prolog before, but never looked into it… that does sound interesting though, and worth a further look! Thanks.

@mawburn Java would probably be a good bet career-wise, as there seems to be plenty of jobs for Java devs… J2EE/JEE seemed to get mentioned quite a bit (at least in my quick search the other day) - is it still pretty important to be familiar with, or is experience with one of the more modern frameworks enough?

Spring, but idk if that would be a “modern” framework in the sense that Play or something like that would be. Spring is by far the most used. There is Spring Boot, which is a modern type micro-framework, but I haven’t followed that at all recently. Spring is a monolithic type monster that has so many pieces you can find Spring libraries in just about every Java project.

They haven’t updated this yet this year, but here are last year’s numbers:

Top 4 Java Web Frameworks Revealed: Real Life Usage Data of Spring MVC, Vaadin, GWT and JSF

ZeroTurnAround does JRebel, which is a program that gives instant restarts to development servers. It touches a lot of companies and is pretty expensive, so I trust their numbers.

Struts is the enterprise of the enterprise frameworks. You will pretty much only see either of these, especially 1, in old projects. Lots and lots and lots of XML configuration.

Also Vaadin and GWT are a little bit different than Spring, JSF, or Play in that they help generate the frontend. Vaadin actually uses Polymer and was mentioned in the Polymer 1.0 release at Google I/O. I can’t stand building the frontend using Java. I’ve heard good thing about Grails, but it’s built in Groovy not Java.

Java is pretty intimidating at first. But it’s not that hard once you understand the workflow and the mindset of the community.

(Also, JEE is probably JSF and J2EE died some years ago. Avoid J2EE.)

Interesting webpage that shows how different languages solve a Sudoku Problem.


**Hats off to Prolog:** [Only 15 lines](http://programmablelife.blogspot.co.at/2012/07/adventures-in-declarative-programming.html)
:- use_module(library(clpfd)).
 
sudoku(Rows) :-  
  append(Rows, Vs), Vs ins 1..9,
  maplist(all_distinct, Rows),
  transpose(Rows, Columns),     
  maplist(all_distinct, Columns),     
  Rows = [A,B,C,D,E,F,G,H,I],     
  blocks(A, B, C), blocks(D, E, F), blocks(G, H, I),     
  maplist(label, Rows).      
 
blocks([], [], []).       
blocks([A,B,C|Bs1], [D,E,F|Bs2], [G,H,I|Bs3]) :-     
  all_distinct([A,B,C,D,E,F,G,H,I]),      
  blocks(Bs1, Bs2, Bs3)

I scrolled down to the Scala portion and it’s an absolute mess. But they had this disclaimer:

It doesn’t look like elegant and functional programming - so what! it works!

I never really got the hang of functional programming, but I can assure you that their’s no nowhere even close to it! lol

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.