News for hackers. Stuff that matters.
Re:The Ruby+OMR JIT by sdegutis on Friday December 02, 2016 @08:09AM (#13088241)
And when you take those two things away, you pretty much just have Java. Which, while it can be optimized, it's also Java.
Re:The Ruby+OMR JIT by pmontra on Friday December 02, 2016 @09:10AM (#13088625)
Java with Ruby's syntax and undeclared typing would make Java programs so shorter that it would be worth it. But there would be nothing left of Java, except the object orientation. It would just be a simpler more static Ruby.
Re:The Ruby+OMR JIT by rurounijones on Friday December 02, 2016 @09:49AM (#13088912)
So.. Crystal lang then :p
Re:The Ruby+OMR JIT by dom0 on Friday December 02, 2016 @09:23AM (#13088709)
You might want to look into Kotlin.
Re:The Ruby+OMR JIT by pmontra on Friday December 02, 2016 @10:56AM (#13089613)
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.

Re:The Ruby+OMR JIT by ryeguy on Friday December 02, 2016 @11:04AM (#13089696)
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.

Re:The Ruby+OMR JIT by pmontra on Friday December 02, 2016 @11:27AM (#13089909)
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.
Re:The Ruby+OMR JIT by evilduck on Friday December 02, 2016 @12:25PM (#13090492)
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.
Re:The Ruby+OMR JIT by scrame on Friday December 02, 2016 @03:59PM (#13092234)
> 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.

Re:The Ruby+OMR JIT by kweinber on Friday December 02, 2016 @08:19AM (#13088291)
There are other ways of meta programming that are still performant.... that is why many Ruby devs see Elixir/beam and Clojure/jvm as good language/platform alternatives.
Re:The Ruby+OMR JIT by pjmlp on Friday December 02, 2016 @08:54AM (#13088521)
Some of us do like Java, even if it is lacking in some things.