Re: [go-nuts] By passing go type check when performing bitwise operator

2019-09-01 Thread Michael Jones
Int(uint(a) >> uint(b))

Is always ok, costs nothing, not a type safety issue.

On Sun, Sep 1, 2019 at 11:56 AM Steven Hartland 
wrote:

> This has been changed in the upcoming 1.13 release, so you might want to
> try the latest release candidate.
>
>
> On 01/09/2019 19:03, Albert Tedja wrote:
>
>  I am trying to perform some bitwise operators, but Go is not letting me
> because the mask is an uint and the values are int. Setting the mask to int
> will break the code since I am shifting bits right and left and prefer the
> prefix 0 when shifting right, and if I am not mistaken, Go does not have
> >>>.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/a211253c-eec1-4efb-8f4c-5e94f04e6681%40googlegroups.com
> 
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/0cd00fab-a296-823d-61bc-1d6b873db761%40multiplay.co.uk
> 
> .
>
-- 

*Michael T. jonesmichael.jo...@gmail.com *

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALoEmQwibN2T4ux%3DLP8zgKuxN_CnbqA5cRFYJawfOzoMA9Rqgg%40mail.gmail.com.


Re: [go-nuts] By passing go type check when performing bitwise operator

2019-09-01 Thread Steven Hartland
This has been changed in the upcoming 1.13 release, so you might want to 
try the latest release candidate.


On 01/09/2019 19:03, Albert Tedja wrote:
 I am trying to perform some bitwise operators, but Go is not letting 
me because the mask is an uint and the values are int. Setting the 
mask to int will break the code since I am shifting bits right and 
left and prefer the prefix 0 when shifting right, and if I am not 
mistaken, Go does not have >>>.




--
You received this message because you are subscribed to the Google 
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to golang-nuts+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a211253c-eec1-4efb-8f4c-5e94f04e6681%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0cd00fab-a296-823d-61bc-1d6b873db761%40multiplay.co.uk.


[go-nuts] By passing go type check when performing bitwise operator

2019-09-01 Thread Albert Tedja
 I am trying to perform some bitwise operators, but Go is not letting me 
because the mask is an uint and the values are int. Setting the mask to int 
will break the code since I am shifting bits right and left and prefer the 
prefix 0 when shifting right, and if I am not mistaken, Go does not have 
>>>.



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a211253c-eec1-4efb-8f4c-5e94f04e6681%40googlegroups.com.