Smaller Goals
•Sane keyword arguments (?!!?!)
•Pattern Matching
•Deprecation of quirky features
•Frozen string literals
Slide 97
Slide 97 text
No content
Slide 98
Slide 98 text
Ruby 3.0
Redux
Slide 99
Slide 99 text
Dictionary Definitions
Slide 100
Slide 100 text
Ruby
Slide 101
Slide 101 text
noun
1. a precious stone consisting of
corundum in colour varieties varying
from deep crimson or purple to pale rose.
2. a programming language optimised for
programmer happiness
Slide 102
Slide 102 text
3
Slide 103
Slide 103 text
number
1. equivalent to the sum of one and
two; one more than two; 3
2. A mystical version rarely
achieved by most software
projects.
Slide 104
Slide 104 text
Redux
Slide 105
Slide 105 text
adjective
1. brought back, revived
Emacs era redux
2. (usually postpositive) (esp of
an artistic work) presented in a new way
Apocalypse Now Redux
Slide 106
Slide 106 text
No content
Slide 107
Slide 107 text
Ruby 3.0 is not
a single
magic release
Slide 108
Slide 108 text
Ruby 3.0 is an idea
Slide 109
Slide 109 text
No content
Slide 110
Slide 110 text
Ruby follows SemVer
Slide 111
Slide 111 text
Ruby 3 is going to be 3 times
faster than Ruby 2.0
person = JSON.parse('{...}', symbolize_names: true)
if person[:name] == ‘Alice’
children = person[:children]
if children.length == 1 && children[0][:name] == ‘Bob’
p children[0][:age]
end
end
Slide 138
Slide 138 text
case JSON.parse('{...}', symbolize_names: true)
in {name: "Alice", children: [{name: "Bob", age: age}]}
p age
...
end
# The following calls pass keyword arguments
foo(..., key: val)
foo(..., **hsh)
foo(..., key: val, **hsh)
Slide 190
Slide 190 text
# The following calls pass **normal** arguments
foo(..., {key: val})
foo(..., hsh)
foo(..., {key: val, **hsh})
Slide 191
Slide 191 text
Breaking change!!!
Slide 192
Slide 192 text
Migration warning in
Ruby 2.7
Slide 193
Slide 193 text
What’s not in Ruby 3.0?
Slide 194
Slide 194 text
Actors
Slide 195
Slide 195 text
Stream processing
Slide 196
Slide 196 text
Frozen string literals
Slide 197
Slide 197 text
Deprecation of autoload
Slide 198
Slide 198 text
https://github.com/fxn/zeitwerk
Slide 199
Slide 199 text
Deprecation of backticks
(`some-command`)
Slide 200
Slide 200 text
Deprecation of character literals
(?x)
Slide 201
Slide 201 text
Summary
Slide 202
Slide 202 text
• Ruby 2.7 will be the final release in the 2.x series
• Ruby 3.0 is scheduled to land in 2020
• Ruby 2.7 will serve as a preview for many of the key features in Ruby 3.0
• Static typing and Guilds are the biggest changes coming to Ruby 3.0
• Keyword argument overhaul is going to be a breaking change
• The migration path from Ruby 2.x to 3.x should be very smooth
Slide 203
Slide 203 text
Community Impact
Slide 204
Slide 204 text
Community Contributed Features
• UTF-8
• Enumerator
• Generational GC
• Keyword Arguments
• JIT
• Concurrency
Slide 205
Slide 205 text
Community Contributions
• Rake
• Bundler
• Documentation & Tutorials
• A ton of amazing libraries
• Rails
• …
Slide 206
Slide 206 text
No content
Slide 207
Slide 207 text
Real Namespaces
(https://bugs.ruby-lang.org/issues/14982)
Slide 208
Slide 208 text
No content
Slide 209
Slide 209 text
Felina
Slide 210
Slide 210 text
Спасибо!
twitter: @bbatsov
github: @bbatsov
https://metaredux.com
https://emacsredux.com
Saint P RubyConf 2019
Saint Petersburg,
Russia
01.06.2019