Hacker News new | ask | show | jobs
by pmontra 3484 days ago
No because it's statically typed, too much work programming like that and it's not worth it for the kind of software I develop (backend of web/mobile apps), but thanks. Suggestions are always appreciated.

I found a defunct Ruby like language called Reia a couple of days ago https://github.com/tarcieri/reia/ and http://reia-lang.org/

It's object oriented and runs on the top of the Erlang VM. It maps classes on gen servers, which is pretty natural and it spares the developer all the boilerplate of creating a gen server module. Unfortunately the language designer killed it because "it's pretty bad to have two competing niche languages with nearly identical features." The other language was Elixir. However the two languages are very different. Elixir is 100% functional, Reia could have been the language to transition millions of OO developers to a functional and concurrent world. I could have used it instead of Ruby.

1 comments

This is an odd stance. Backends are where static typing shine, and where those who like static typing sing its praises. Maybe you just don't like static typing?

I really don't find static typing to be more "work". You still have to think about types in dynamically typed languages, you just get to skip specifying them.

Skipping that saves a lot of keypresses and time. I always found very little help from static typing. I know what I'm doing if I type hash = {} in Ruby and there is no need to declare it as HashTable (what else could it possibly be?). About the types of the keys and values, they don't matter much in my experience. Maybe it's Ruby or it's Rails, but they tend to fall right into place without surprises.
In case you're not aware, many static languages have implicit typing nowadays. I still write Ruby most often, but for example in Go you could just write `something := "string"` and with that := operator it'll manage the type assignment for you. Lots of other static languages offer that now also. I'm not well versed on modern Java, but the type system in Go pretty much gets out of the way for the things I've done with it.
> I type hash = {} in Ruby and there is no need to declare it as HashTable (what else could it possibly be?)

In java you have options other than a HashMap, there is LinkedHashMap (which preserves insertion order) and TreeMap (which stays sorted according to a comparator). There are also extensions for things like Immutability. The checking can also guarantee that it will only have one type of object, or a common interface, or you could allow it to accept any kind of object.

So, yeah, there's quite a few things that an associative array could be, and there's reasons for all that, and i've used most of these on web backends.