Day 1 of CodeMash 2016 I attended the full day workshop presented by Amber Conville (@crebma) called 7 Languages in 7 Hours. The languages used were Ruby, Rust, Go, Elixir, Clojure, Haskell, and Scala. I am familiar with Ruby but the other 6 were completely new to me.
To get a feel for solving a non-trivial problem with the languages we completed the Prime Factors Kata with each one. Although you can’t go too deep into a language in 1 hour, I was able to get a sense of the syntax and make some initial observations.
- Clojure looks like a hot-mess of parentheses. I’m not sure what type of problem it is best suited to solve, but it would have to be pretty compelling for me to use it.
- Haskell was fairly easy to use, but the indentation rules caused some headaches at first.
- The Rust syntax was reasonably understandable and we learned that the the language is “safe and fast”. I found it a bit confusing that semi-colons are required at the end of some statements, but not at the end of some others.
- Maybe it was the curly braces, but Scala felt familiar to the C# part of me. The Scala tests looked just like RSpec from the Ruby world (which I like), although they were slow to run.
- Elixir is built on Erlang so it is fast. I also thought it looked a lot like Ruby. It had three features which made the Prime Number Kata particularly easy to solve: default parameters, recursion, and pattern matching. The tests were also very fast to run.
- I had some issues getting my machine setup to execute the Go code so I spent the least amount of time with it.
- I have worked with Ruby for several years so I was able to solve the Kata much more efficiently than with the other languages. Although, I am certainly no expert at it, I like Ruby.
It would be interesting to solve a more complex business problem with these languages to really see what they are best suited for.