Use Dictionary default values #97
Labels
enhancement
New feature or request
good first issue
Good for newcomers
internal change
Something that only changes on the inside
low priority
Something that is not urgent
I was reading an article about changes introduced in Swift 4 and came across the ability to provide a default value when accessing a dictionary:
We could take advantage of this in quite a few places in
Dice.Swift
, and possibly other places:DiceKit/Sources/DiceKit/Dice.swift
Line 75 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 86 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 110 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 123 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 136 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 162 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 199 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 203 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 215 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 219 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 229 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 233 in d67f52f
DiceKit/Sources/DiceKit/Dice.swift
Line 399 in d67f52f
The text was updated successfully, but these errors were encountered: