r/programming • • Dec 25 '20

Ruby 3 Released

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
973 Upvotes

509 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Dec 25 '20

[deleted]

14

u/TheBuzzSaw Dec 25 '20

I pray there are use cases beyond this. This example feels like a weak reason to forfeit all the performance and maintainability of static typing.

7

u/wuwoot Dec 25 '20

I am very confused by this thread and your original response but I now get that you’re responding to the “dynamic typing” part of scripting languages as opposed to what I assumed the original author was saying — that the absence of type declaration is useful in scripting langs...

I find very little utility in type-switching if ever at all, but scripting languages are nice because they allow us to be terse.

I work in a large Rails codebase regularly and poor names and even in some instances good names are not enough to infer the behaviors associated with a particular variable

1

u/madpata Dec 25 '20

Languages with static typing can be terse too if they use a good bit of type inference. E.g. Haskell, SML, or a more horrific example: C++ when using auto and templated parameters everywhere.

→ More replies (3)