Comment by cpeterso
1 month ago
Is there an advantage for trb code to use colons for type annotations like:
def greet(name: String): String
Instead of arrows like rbs files? Why diverge from precedent?
def greet: (name: String) -> String
1 month ago
Is there an advantage for trb code to use colons for type annotations like:
def greet(name: String): String
Instead of arrows like rbs files? Why diverge from precedent?
def greet: (name: String) -> String
Typescript. I imagine most people writing Rails applications are also writing typescript for front-end code, so being able to use the same muscle memory for Ruby typing seems high desirable. That is the thing that stood out to me when I saw this site: it looks like they are taking the very positive lessons from Typescript and applying them to Ruby.
I agree with other posters here. I don't need everything typed - Ruby's duck typing is an awesome feature - but I do wish that some of the more important interfaces in our code were more strongly self-documenting and enforced.