rbwhitaker / CSharpPlayersGuideEarlyAccess

A place to track issues with the C# Player's Guide for patches and future editions
19 stars 0 forks source link

Relaxed shift operator requirements #649

Closed rbwhitaker closed 1 year ago

rbwhitaker commented 2 years ago

The second operand on a shift used to need to be an int or convertible to an int. These can now take advantage of generic math.

I don't think this one necessarily deserves a mention. I wasn't calling out this type of limitation, to removing the limitation maybe also doesn't require addressing the lessening of the limitation.

rbwhitaker commented 1 year ago

After additional consideration, this does not need to be covered specifically in the book. Bitshifting is a relatively advanced topic, and the thought that it makes sense to be an integer or similar is unsurprising. So I don't think it is worth specifically calling this out, though I do like the feature.