I wanted to have bake my cake and eat it too with frosting on top, by implementing a protocol and struct such that
-
I wanted to have bake my cake and eat it too with frosting on top, by implementing a protocol and struct such that:
* declare and assign a var of a new type with a UInt8 value
* pluck out bit values from that var
* while enforcing types and constraints
* with as little ceremony as possible -
Paul Cantrellreplied to Programmer 'til the 𝙲𝚘𝚠<>s come home last edited by
@quephird
That’s such a lovely example of a place where Swift really shines!
Copyright © 2024 NodeBB | Contributors