News for hackers. Stuff that matters.
Re:Types will be part of Ruby 3 stdlib source by darkdimius on Friday April 19, 2019 @02:49AM (#19697581)
We're collaborating with @yukihiro_matz, @mametter, @soutaro and Jeff Forster to make sure that types are not disruptive to Ruby. Thus, types are optional. The intention is to deliver value for unmodified Ruby programs. Hear more from Matz at https://youtu.be/cmOt9HhszCI?t=2148
Re:Types will be part of Ruby 3 stdlib source by pmontra on Friday April 19, 2019 @05:09AM (#19698071)
So, something along the lines of https://github.com/soutaro/steep but without the annotations in the original source code, because Matz said "no annotations". That's nice because it doesn't pollute the code. I use Ruby because of Rails and because I don't have to write types. I can use many other languages if I want to write them.
Re:Types will be part of Ruby 3 stdlib source by mratzloff on Friday April 19, 2019 @06:49AM (#19698443)
As long as types can be required to be explicit where ambiguous (e.g., TypeScript) in the file itself (via a magic comment or similar), I'm all for it. I am happy to declare types for external calls if I need to.

I have said for awhile that "Ruby with types" would be my favorite language to work in. I recently returned to Ruby briefly and had to integrate with a poorly-documented API. I spent more time digging through third-party code trying to figure out what certain parameters were supposed to be than writing the program itself.

Re:Types will be part of Ruby 3 stdlib source by uryga on Friday April 19, 2019 @08:25AM (#19698974)
i haven't used it, but have you looked at the Crystal language? i think the idea is basically "statically typed Ruby".
Re:Types will be part of Ruby 3 stdlib source by mratzloff on Friday April 19, 2019 @06:22PM (#19703507)
I've heard of it and looked at it a bit, but haven't had a chance to use it yet!
Re:Types will be part of Ruby 3 stdlib source by fouc on Friday April 19, 2019 @08:41AM (#19699061)
Could elixir be a good alternative? It has typespecs https://elixir-lang.org/getting-started/typespecs-and-behavi...