Just curious, and I apologize if this sounds snarky, that's not my intent, but is anyone here actually using Go for anything? If so, what?
C? Go? Cgo
11–20 of 26 posts
Re: C? Go? Cgo
#12Re: C? Go? Cgo
#13Just curious, and I apologize if this sounds snarky, that's not my intent, but is anyone here actually using Go for anything? If so, what?
I've been patiently waiting for them to target shared libraries, so I could use it from inside of many different VMs or/and servers, from ruby/python/jvm to apache/nginx. Frankly I just don't see a need for Go executables. What will I do with them? Run in bash?
Re: C? Go? Cgo
#14Just curious, and I apologize if this sounds snarky, that's not my intent, but is anyone here actually using Go for anything? If so, what?
I've written a few thousand lines. A couple toy VMs/compilers, some web apps, some random graphical tinkering. Nothing big, but enough to feel like I've gotten a sense of the language. I started using it expecting to be annoyed by all of the features it doesn't have, but I ended up really liking it and not really missing much. It has become my go-to language for random tinkering and prototyping, in part because I alw…
Re: C? Go? Cgo
#15I've used it as a lightweight web server in several projects.
Re: C? Go? Cgo
#16Earlier quoted context omitted.
I've written a few thousand lines. A couple toy VMs/compilers, some web apps, some random graphical tinkering. Nothing big, but enough to feel like I've gotten a sense of the language. I started using it expecting to be annoyed by all of the features it doesn't have, but I ended up really liking it and not really missing much. It has become my go-to language for random tinkering and prototyping, in part because I alw…
Has the absence of generic types been a problem for you?
At this point I don't miss generics at all. The benefit they would give me are marginal enough to not consider it a vital component.
I've found that when you become proficient in Go, you will write different code that does not really require generics to be present. At least 99% of the time.
Having said that, I am still hoping that we might one day get unions. Unfortunately there is little hope of that at this point. It has been considered, but they would have to be type-safe in order not to circumvent Go's type system. And doing so, would differentiate them very little from Go's existing 'interface{}' type. There is a small benefit to unions, but apparently not big enough to warrant implementing them.
As far as generics go, they are not out of the question. The problem so far has been that nobody has yet offered a generics proposal that doesn't partially or completely mess up the language and generally make things more difficult for everyone.
Re: C? Go? Cgo
#17#include are broken in code listings
Re: C? Go? Cgo
#18Just curious, and I apologize if this sounds snarky, that's not my intent, but is anyone here actually using Go for anything? If so, what?
Written ~10k lines in total maybe more. I like the language. However, it has its limitations.
[1] https://github.com/timtadh/Go-Filestructures
[2] https://github.com/timtadh/tdpp
Re: C? Go? Cgo
#19Just curious, and I apologize if this sounds snarky, that's not my intent, but is anyone here actually using Go for anything? If so, what?
I use it for everything these days. I've written numerous web apps and we publishing apps as well as a few prototype game servers. It's a joy to program in.
Re: C? Go? Cgo
#20Just curious, and I apologize if this sounds snarky, that's not my intent, but is anyone here actually using Go for anything? If so, what?
- A port from C of a fast prime number generator: https://github.com/jbarham/primegen.go
- A Cdb ("constant database") implementation: https://github.com/jbarham/cdb.go
- A Cgo PostgreSQL wrapper: https://github.com/jbarham/pgsql.go
- The beginnings of an AWS library: http://code.google.com/p/goaws/
Regarding the OP, Cgo is like magic since e.g. my PostgreSQL libpq wrapper provides a pretty rich PostgreSQL driver for Go in well under 400 LOC. Best of all, I can write most of it in pure Go itself! The grungy low-level C interface code is mostly auto-generated.
http://news.ycombinator.com/item?id=2335228 is another comment I made about programming in Go.