Re: Ruby3 Will Have Types

Nicola Mingotti <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <[email protected]>

good news !

I like it, until types are not mandatory and I am not forced to change 
my existing code ;)

bye
n.


On 4/19/19 1:41 AM, Gerald Bauer wrote:
> Hello,
>
>     Today's biggest (most upvoted) story on Hacker News:
>
>     Ruby3 Will Have Types [1]
>
>     Any comments or thoughts here on ruby-talk about the breaking news?
>
>    Here are my two cents:
>
>    As a head start you can add the missing Bool type today :-), use the
> safebool library / gem [2]
>
>     Sorbet is a great inspiring project. Hopefully, open source soon.
> FYI: sruby - that is (secure) ruby [3] - is an alternative ruby
> (subset) with an alternative (optional) type annotation syntax e.g.
>
>     Sorbet's `sig {params(x: Integer).returns(String)}`
>
>    becomes
>
>    `sig [Integer] => [String]` or `sig Integer => String`
>
> Note: Since the sig is "yes, it's just (regular) ruby" code you can
> create an alias for types e.g. I = Integer, S = String and than use
> sig I=>S, for example.
>
>     Cheers. Prost. Happy (type-safe) coding with ruby.
>
> [1] https://news.ycombinator.com/item?id=19697405
> [2] https://github.com/s6ruby/safebool
> [3] https://github.com/s6ruby
>
> Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.