Optional type annotations

Is there any plan (discussion) to add optional types to Ruby? Something
similar to what Dart has.

Hi,

No. I don’t like the optional static typing.
I’d rather add soft typing with type inference, but I have no idea to
implement it in efficient/compatible way.

          matz.

In message “Re: Optional type annotations”
on Wed, 18 Dec 2013 11:19:37 +0100, “Grzegorz D.”
[email protected] writes:
|
|Is there any plan (discussion) to add optional types to Ruby? Something
|similar to what Dart has.

great to see Matz replied here!

  • Semantically, dart is very similar to ruby (to some extent):
    1. everything is object
    2. single inheritance
    3. mixed in

With dart has first-class function, it wouldn’t be too difficult to
implement proc etc in ruby as well.

I am just curious, if ruby can bring dart-vm under its belt?

  • Of course, the motivation is speed

Thanks

Yukihiro M. wrote in post #1130954:

Hi,

No. I don’t like the optional static typing.
I’d rather add soft typing with type inference, but I have no idea to
implement it in efficient/compatible way.

          matz.

In message “Re: Optional type annotations”
on Wed, 18 Dec 2013 11:19:37 +0100, “Grzegorz D.”
[email protected] writes:
|
|Is there any plan (discussion) to add optional types to Ruby? Something
|similar to what Dart has.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs