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 552207
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Cross-compiling
by moondevil on Tue 12th Feb 2013 12:47 UTC in reply to "Cross-compiling"
moondevil
Member since:
2005-07-08

Go is a dream to cross compile with. eg I can write a program on x86 Windows, test it and then compile it for a Linux ARMv6, still on the Windows PC, and just copy the ELF over. No code modifications what-so-ever.


This is only possible if you restrict yourself to the base library and Go pure code.

This is nothing new, cross-compiling exists since the dawn of computing.

Reply Parent Score: 3

RE[2]: Cross-compiling
by Laurence on Tue 12th Feb 2013 14:10 in reply to "RE: Cross-compiling"
Laurence Member since:
2007-03-26

I really wish people would read before arguing...

This is only possible if you restrict yourself to the base library and Go pure code.

Yet that's exactly what the context of this thread is about. We're not talking about some imaginary examples of Go which break convention; we're talking about Go code written as Go code is designed. And that means using non-OS specific API calls in the base to build extended non-OS specific Go libraries.

Go is designed with portability in mind. C++ wasn't. So while C++ can be portable, it's much easier to write portable code in Go.


This is nothing new, cross-compiling exists since the dawn of computing.

Thank you for telling me what I'd already categorically stated in my post.

My point was Go makes the process much less painful, not that it's the only language to have ever supported cross-compiling.



These days you can do pretty much anything in pretty any language. So the choice of language boils down to productivity (time spent coding, compiling, porting, etc) vs performance (raw execution speed, memory usage, etc) and sometimes even performance is a non-issue. So my point was this: Go enhances productivity. Which is why it's my new go-to language.

Edited 2013-02-12 14:20 UTC

Reply Parent Score: 5

RE[3]: Cross-compiling
by Alfman on Tue 12th Feb 2013 18:17 in reply to "RE[2]: Cross-compiling"
Alfman Member since:
2011-01-28

"Go is designed with portability in mind. C++ wasn't. So while C++ can be portable, it's much easier to write portable code in Go."

I actually agree with moondevil's point. While the c++ ecosystem is filled with tons of incompatible libraries/frameworks across tons of platforms, the c++ language itself doesn't impose significant portability issues, in fact it's highly portable. I think you ought to be blaming the C++ frameworks for portability issues rather than the C++ language itself.

Now in the end this difference may be mute because we really do need the C++ frameworks in practice, but I think it's important to recognize because without a central authority for coordination of one common framework, all languages have the potential to devolve into the situation C++ finds itself in with incompatible local frameworks. I can see it now: "microsoft foundation classes for Go", haha.



Personal anecdote:
Even the JDK, with the most portable framework I've ever used, wasn't perfect. For a university project we were using java to control serial ports connected to early bluetooth prototypes. The JDK worked perfectly from windows, but we needed to adopt a custom serial port driver for spark workstations (oh delicious irony).

Reply Parent Score: 3