Re: [go-nuts] Adding &&= and ||= operators for working with bools

2019-01-05 Thread Michael Jones
sorry...i'm not skilled at linking to old groups discussions. https://groups.google.com/d/topic/golang-nuts/xwkDwB9Q0Rs/discussion not agitating. ;-) just recalling. On Sat, Jan 5, 2019 at 9:16 PM Rob Pike wrote: > edit: seems NOT worth it. > > -rob > > > On Sun, Jan 6, 2019 at 4:16 PM

Re: [go-nuts] Adding &&= and ||= operators for working with bools

2019-01-05 Thread Rob Pike
edit: seems NOT worth it. -rob On Sun, Jan 6, 2019 at 4:16 PM Rob Pike wrote: > That link doesn't work - it's into your mailbox. > > However, I do remember talking about this option some time ago, including > when the language was first being designed. It didn't seem common enough to >

Re: [go-nuts] Adding &&= and ||= operators for working with bools

2019-01-05 Thread Rob Pike
That link doesn't work - it's into your mailbox. However, I do remember talking about this option some time ago, including when the language was first being designed. It didn't seem common enough to warrant adding, and C got along fine without it. Your regularity argument carries some weight but

Re: [go-nuts] Adding &&= and ||= operators for working with bools

2019-01-05 Thread Michael Jones
not Rob but rather Ian... (6/22/2012) https://mail.google.com/mail/u/0/#label/go%2Fgolang-nuts/FMfcgxwBTsjnkHgqhvQfLqrXsJdHZRxC On Sat, Jan 5, 2019 at 7:52 PM Michael Jones wrote: > I brought it up early on, wanting AND (&) and OR (|) as well as AND-ASSIGN > (&=) and OR-ASSIGN (|=). > > Not

Re: [go-nuts] Adding &&= and ||= operators for working with bools

2019-01-05 Thread Michael Jones
I brought it up early on, wanting AND (&) and OR (|) as well as AND-ASSIGN (&=) and OR-ASSIGN (|=). Not enthusiastic about shortcut operators on assignment form. Rob posted here that he was ok/open to the idea. On Sat, Jan 5, 2019 at 5:55 PM Caleb Spare wrote: > Sometimes when working with

[go-nuts] Adding &&= and ||= operators for working with bools

2019-01-05 Thread Caleb Spare
Sometimes when working with bools I wish I could write myBool &&= x rather than myBool = myBool && x I believe that && and || are the only binary operators in the language for which the assignment form makes sense but doesn't exist (i.e., we have +=, &^=, >>=, and so on). So in some sense

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread David Collier-Brown
Mr. Tiwari: Major ports are rather like major rewrites, in that if you think of the program as a tree, the parts that stay the same are the trunk and branches, and the parts that change are the leaves. If you draw a picture of the old program on a whiteboard, you have an (initial) design

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Drew Derbyshire
I am reminded of someone once asked how to go from Burlington MA to Waltham, when what he really wanted to do was go from Burlington to Logan Airport. (For the uninformed, via Waltham is not generally how most would do it.) This conversation is thoughtfully covering all angles of the C++ to

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Michael Jones
A rewrite will be better. Really. On Sat, Jan 5, 2019 at 10:11 AM Abhishek Tiwari wrote: > Hi Jake & Friends, > > Thank you so much for awesome response and great help. I am going through > all replies in detail one by one. > Actually, I am working on solving a job assignment : 8-10 C++ files

Re: [go-nuts] Json decode : Monitoring errors properly

2019-01-05 Thread thomas
I got it. In fact, if the buffer is bad, it is not erased, and Buffered() returns it (and not the following). That was my misunderstanding. Thank you all ! On Thursday, 27 December 2018 00:31:12 UTC+1, Kevin Conway wrote: > > > I believe https://golang.org/pkg/encoding/json/#Decoder.Buffered

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Abhishek Tiwari
Hi Jake & Friends, Thank you so much for awesome response and great help. I am going through all replies in detail one by one. Actually, I am working on solving a job assignment : 8-10 C++ files need to be converted to Go. As far as the technical details of the code is concerned, seems its a

Re: [go-nuts] C++ 11 to Golang convertor

2019-01-05 Thread Andy Balholm
Yes, the preprocessor… The preprocessor is one of the biggest obstacles to readable C-to-Go translation. rsc/c2go largely ignores preprocessor directives other than #include—and it doesn’t include a translation of the headers at the top of every output file. But most C programs are a lot more

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Eric Raymond
On Friday, January 4, 2019 at 2:41:19 PM UTC-5, robert engels wrote: > > I still think it would be a nearly impossible task given the C code in the > wild - outside of threading, the common usage of ‘unions’ - there is no > way I know of to map these to a simple Go struct, or even several -

[go-nuts] new year greetings

2019-01-05 Thread Victor Giordano
To everyone!! Let's say in golang fashion way... func year_2018 () { defer greetingsOf("2019") // code that happened across 2018... } func greetingsOf(year string) { fmt.Println("happy new fresh " + year ) } That is!! Greetings and nice start to all! -- You received this message