I keep seeing mature developers using languages like Go, Rust, Scala, and Erlang; how are those different from using the more common Node/JS, Ruby, PHP, and Python?

Your "Better Four" are all strongly-typed compiled languages. Your "Default Four" are all dynamic/some weakly-typed interpreted languages. Rust and Go have only come to public use within the last few years, Scala is 12 years old, and Erlang is almost 30 years old. The first three are like beautiful, clean, modern versions of the classic C/Java languages, and Erlang is very strong in the niche of distributed, concurrent programming.

Scala brings functional programming, actor-based concurrency and an advanced type system to the Java VM, and brings the Play/Akka frameworks and ScalaJS library with it. You could think of it as a modernized/extra-features version of Java. I believe this is the most widely used of your "Better Four", and it's an easy choice for an engineering team with Java experience to consider for future projects. We use it at work for a few sections of the back-end.

Go is like a modernized version of C with garbage collection. Easy built-in concurrency, cleaner syntax, strong standard libraries, super fast compilation. It's got a minimalist language design philosophy. Supported by Google and many famous programmers, including Kernighan, the "K" of the original K&R C programming book which many programmers got started with.

Erlang has built-in support for being written in a concurrent, distributed, and fault-tolerant manner, something that can be extremely complex with other languages. It was developed for use in telecom systems decades ago. I can't say much more because I haven't tried it yet. Coders coming from your "Default Four" may be interested in Elixir, a functional language with Ruby-like syntax built on top of the Erlang VM (a very raw/new language though, only hitting v1.0 in September 2014. probably best to save it for side projects for now).

Rust is a new systems language from Mozilla that emphasizes safe code and extremely fast execution. It uses a lot of functional programming concepts and allows manual memory management, making it more suitable for low-level programming than the rest on this list. Usually writing low-level code is difficult and buggy, but Rust is very strict and almost always won't compile if there are potential errors. I don't think it's a good choice for web development yet. There does not exist a mature ecosystem of libraries and frameworks.

Your "Default Four", PHP/JS/Ruby/Python are all high-level scripting languages. They can run orders of magnitude slower than compiled languages, be more memory inefficient, and are harder to find good tooling/IDEs for. They are not typically taught in university computer science programs (except Python). They are generally all easier to write and deploy, and have strong ecosystems of web application frameworks and libraries, and are usually the preferred choice for most web applications that don't scale to massive traffic or require difficult computations.

PHP is probably the easiest of all program languages to deploy for use as a web language.

<body>
  <?php echo '<p>Hello World</p>'; ?> 
</body>

PHP grew organically out of a personal project, not designed by an academic committee or corporate engineering team, and often gets criticized for its design inconsistencies and accumulated 'crud'. It also attracts a lot of inexperienced programmers because it's so easy to get started with. However, the world's most popular blog/CMS applications, WordPress/Joomla/Drupal are all written in PHP. Modern PHP (5+) with the built-in opcode cache, frameworks like Laravel, the HHVM, etc, is much better, but still probably most engineering teams with experience with other languages would not pick PHP for a new project. It's not that it's bad, but it doesn't really do anything better than other languages except support popular old software, so if you're not using that software... I got my start in web development writing PHP with the Symfony framework and deploying software like phpMyAdmin and phpBB.

JavaScript is a strangely-behaving (prototypical inheritance, functional variable scoping, automatic type-coercion), inconsistently supported language that only recently started being available for use outside the browser with NodeJS. That probably says it all when it comes to explaining why it is rarely a popular long term choice for corporate back-end web applications. However, it is the only choice for front-end web development, so it will always remain a popular language for the foreseeable future.

Some believe that web applications compiled to native code for deployment as phone and desktop via technologies like Apache Cordova, Facebook React Native, Telerik PhoneGap, etc, will rise to popularity in the future. Many languages now compile to Javascript to allow you to write Javascript without the pain of using/learning too much Javascript. (e.g. CoffeeScript, ClojureScript)

Ruby and Python are both beautiful, elegant, concise languages with strong web ecosystems, long histories, and are popular worldwide. Ruby, with the Rails/Sinatra frameworks and RubyGem plug-ins, can allow even an intermediate programmer to write useful web applications incredibly quickly. Personally, I think Ruby is the most productive/pleasant language to work with I've ever used, and I push for my company to use it more.

Python with Django/Tornado/Flask has a similar speed, but it has a much stronger ecosystem of academic, scientific, and mathematical libraries. Both languages are among the slowest languages on this list, which is why the biggest companies don't base core back-end code on these languages. That speed gap is usually not a problem for most businesses and their medium-scale, computationally non-intensive apps. Remember also that there are other bottlenecks besides application code speed. (database speed, database access, server bandwidth, proxy server e.g. nginx/apache speed)

TLDR Erlang: Niche language for distributed systems. Scala: Modern replacement for Java. Rust/Go: Modern replacements for C/C++.

Javascript: The only language for web front-end. PHP: Un-elegant, old, very popular, built purely for the web. Ruby: Beautiful, elegant, slow. Rails is like a magical productivity multiplier. Python: Elegant, slow, lots of academic libraries.

/r/webdev Thread