Linked by Thom Holwerda on Mon 11th Feb 2013 22:59 UTC
General Development "I feel like writing about the Go programming language (or 'Golang') today, so instead today's topic is computer stuff. For the record, the language I've programmed the most in has been Python, so that’s the perspective I'm analyzing it from." Some good and bad things about Go.
Thread beginning with comment 552406
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[12]: My thoughts on Go
by lucas_maximus on Thu 14th Feb 2013 00:18 UTC in reply to "RE[11]: My thoughts on Go"
lucas_maximus
Member since:
2009-08-18

** GROAN **

There is no way for me to know unless I check every function in an object whether it is implementing the interface.

With something like the implements keyword is makes it crystal clear.

It is less obvious while reading the code whether a type is implementing an interface in than Java or C#. It is extra mental overhead that can be used on other things.

Reply Parent Score: 2

RE[13]: My thoughts on Go
by satsujinka on Thu 14th Feb 2013 18:48 in reply to "RE[12]: My thoughts on Go"
satsujinka Member since:
2010-03-11

Why are you being obtuse?

I've already covered that it's not necessary to know whether a type implements some interface. The only time you need to know that is when you're passing an object to a function and that's a comparatively small amount of usage compared to what the function in question will actually do.

So, most of the code that you will read is going to be code that uses an interface to do something. Exactly like the function I gave. So it is always crystal clear what capabilities are at hand.

Reply Parent Score: 2

RE[14]: My thoughts on Go
by lucas_maximus on Thu 14th Feb 2013 19:43 in reply to "RE[13]: My thoughts on Go"
lucas_maximus Member since:
2009-08-18

I explained it up-teenh times as my Grandfather would say.

It is about readability and I want to know before compile whether I am writing the code correctly ... just an odd habit I have.

I think unless the code is crytal clear on its intent then it is not correct.

I work with a lot of developers, some are my skillset, some are better.


Some have re-skilled via courses and we obviously have juniors.

It is easier to tell them with a language when this word is put in front of a variable that is changes the accessibility of that variable ... same with the interfaces.

For example.

I can tell them "If the interface has these methods defined then anything implementing them must implement them".

It is crystal clear, there is no implied. The compiler will kick your ass straight away even if the IDE of choice doesn't tell you before hand.

I believe you are simply missing the point on purpose at this point in the discussion.

Reply Parent Score: 2