From: Rob Blanco Date: 2016-03-14T23:06:44+01:00 Subject: [ruby-core:74307] Re: Type systems for Ruby On 03/14/2016 05:07 AM, NARUSE, Yui wrote: > Matz says about Soft Typing in the Keynote, but he also says he want > static type checking. > (I personally think they are conflicted) Well, you can get some static type checking out of soft typing based on what your program text lets you infer about the types. I don't have a good intuition of how far that goes for an expressive language like Ruby, but it's certainly possible. > Type System is a tool to solve a problem. > Matz says there's three expected problem for it: > * performance > * debug (compile time check) > * documentation > > If you tackle this, you should decide what problem will you solve. > Because Matz says and Ruby programmers are lazy, it is better if > people doesn't need to write type. > But it's must be useful in some portion. > People can write type if it is really worth writing. > You may need to find a best mix with optional typing. > > NOTE: > Matz strongly objects to introduce any syntactic annotations to Ruby now. > But he also says he don't forbid to embed annotations as comments (or rdoc). Performance is neat, but I think debug and documentation go together and are more important, and those are the ones I would consider first. I agree that there should be a useful mix to be found involving optional typing, and probably (in line with typing as documentation) RDoc is the right place to make these annotations, if any. Unsubscribe: