tag:blogger.com,1999:blog-8110657754519829885.post1102430579330613478..comments2023-07-10T01:54:55.230-07:00Comments on GoLang Tutorials: Structs in Go - instead of classes in Object Oriented ProgrammingSathish VJhttp://www.blogger.com/profile/15718521031646368740noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-8110657754519829885.post-9801847017891297252016-04-26T09:43:51.359-07:002016-04-26T09:43:51.359-07:00how to define static values for using in & edi...how to define static values for using in & editing from another packagesberkcanhttps://www.blogger.com/profile/01698910348473132496noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-14098442533428944522014-11-08T22:26:30.294-08:002014-11-08T22:26:30.294-08:00Java has structures but as final classesJava has structures but as final classesAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-25093065366969602802014-07-09T00:47:19.900-07:002014-07-09T00:47:19.900-07:00Mr. Sathish,
Just a correction - above you mention...Mr. Sathish,<br />Just a correction - above you mentioned <br />" Languages like Java, C#, C++ and others also have structs. "<br />which is incorrect as Java doesn't support structures. I know it may not be relevant to topic but it may misdirect othersAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-52460011751624237292014-07-07T07:01:14.733-07:002014-07-07T07:01:14.733-07:00Try the code at http://play.golang.org/p/pDEcovStO...Try the code at http://play.golang.org/p/pDEcovStOn.<br /><br />Maybe it's because you didn't use %p in your printf.Sathish VJhttps://www.blogger.com/profile/15718521031646368740noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-15410458366429885682014-07-07T06:51:42.845-07:002014-07-07T06:51:42.845-07:00Hi. Please explain why go prints "Rectangle p...Hi. Please explain why go prints "Rectangle pr as address is: &{8 6 ptr_to_rectangle}" instead of real address? Thomashttps://www.blogger.com/profile/17402890556608992527noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-11318395606430347642014-03-03T22:01:20.402-08:002014-03-03T22:01:20.402-08:00I was having a lot of trouble with exporting struc...I was having a lot of trouble with exporting struct fields. I just didn't have them capitalized. Why was this so hard to find an answer for on the internet? Thank you.Jayhttps://www.blogger.com/profile/10514052224242208916noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-60294341198474121652013-08-26T03:13:49.267-07:002013-08-26T03:13:49.267-07:00Yes! I had this misconception at the beginning, a...Yes! I had this misconception at the beginning, and I can't quite believe I let this page be for so long. Will fix it. Thank you.Sathish VJhttps://www.blogger.com/profile/15718521031646368740noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-12790333905812847352013-07-04T11:23:06.945-07:002013-07-04T11:23:06.945-07:00It's a little inaccurate to say that Go is a p...It's a little inaccurate to say that Go is a procedural language. The absence of the `class` keyword and type inheritance doesn't really make it non-OO. http://golang.org/doc/faq#Is_Go_an_object-oriented_languageUnknownhttps://www.blogger.com/profile/00286484886230096247noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-13877529922206663732013-04-14T06:35:47.797-07:002013-04-14T06:35:47.797-07:00Hey, I just want to say thanks a lot for the fanta...Hey, I just want to say thanks a lot for the fantastic tutorials. I've just started getting into go and your blog provides,hands down, the best beginner introduction.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-30304229373283588202013-02-11T06:56:43.017-08:002013-02-11T06:56:43.017-08:00I still don't get why not 'this' synta...I still don't get why not 'this' syntactic sugar:<br /><br />type House struct { <br /><br /> func GetHouseName() string {<br /><br /> this.foo <br /><br /> *this = new (House) //NOT ! :)<br /><br /> }<br /><br />}<br /><br /><br />or even a new one:<br /><br />type House object {<br /> ///for a new syntactic sugar using this<br />}Anonymoushttps://www.blogger.com/profile/11590871421104178408noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-54563457706232428752012-10-23T16:22:31.604-07:002012-10-23T16:22:31.604-07:00its sorta like default in javaits sorta like default in javaAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-52635564386913591732012-10-23T16:21:01.260-07:002012-10-23T16:21:01.260-07:00it means that functions, identifiers and structs t...it means that functions, identifiers and structs that start with lower case letter they not visible in other packages besides the one they are declared. package can be in few files. so if identifier starts with capital letter its visible in whole package.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-42504556116339601512012-08-11T09:32:14.726-07:002012-08-11T09:32:14.726-07:00I ask what mean NOT visible outside the package
w...I ask what mean NOT visible outside the package <br />when you private variable in class <br />ex <br />class name {<br />private var;<br />}<br />this mean it's only scope in this class <br />are NOT visible outside the package meaning only inside this struct or what ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-22586242761107328102011-10-12T11:14:43.839-07:002011-10-12T11:14:43.839-07:00Yep, that is slightly better. Updated.Yep, that is slightly better. Updated.Sathish VJhttps://www.blogger.com/profile/15718521031646368740noreply@blogger.comtag:blogger.com,1999:blog-8110657754519829885.post-66293760753215034872011-10-12T02:18:07.380-07:002011-10-12T02:18:07.380-07:00Replace public void getHouseName() with public Str...Replace public void getHouseName() with public String getHouseName() to make it similar to Go example in Partial code: In JavaRajhttps://www.blogger.com/profile/05703123060362340200noreply@blogger.com