3 ms·
After changing focus from Ruby to functional languages recently I've found that optional types can be really helpful in a lot of situations. Ruby also has anot
by Dangeranger 10y ago
After changing focus from Ruby to functional languages recently I've found that optional types can be really helpful in a lot of situations.
Ruby also has another popular and mature library that I am surprised nobody has mentioned yet named 'Contracts.ruby'
https://github.com/egonSchiele/contracts.ruby https://github.com/egonSchiele/contracts.ruby
This syntax is also more appealing to my eyes than what rdl provides.
Contract Num => Num
def double(x)
x * 2
end