-
Notifications
You must be signed in to change notification settings - Fork 4
Use Dictionary default values #97
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersinternal changeSomething that only changes on the insideSomething that only changes on the insidelow prioritySomething that is not urgentSomething that is not urgent
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersinternal changeSomething that only changes on the insideSomething that only changes on the insidelow prioritySomething that is not urgentSomething 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