News for hackers. Stuff that matters.
Re:Rust vs C Pitfalls by pornel on Tuesday December 27, 2016 @07:43PM (#13267569)
I write libraries.

In Go I can only write libraries for Go programs. In Rust I can write libraries for any program.

i.e. Rust can easily produce static and dynamic libraries that are linkable with C programs and any language with a C FFI. I can write Rust code that works for programmers using C, C++, C#, D, Go, Swift, Python, PHP, Java, etc.

Re:Rust vs C Pitfalls by thegeekpirate on Tuesday December 27, 2016 @09:39PM (#13268016)
Re:Rust vs C Pitfalls by shanemhansen on Tuesday December 27, 2016 @09:30PM (#13267990)
> In Go I can only write libraries for Go programs.

That's not true. It's quite simple to create a loadable shared object in go and call it using anything with a c ffi.

Re:Rust vs C Pitfalls by lobster_johnson on Tuesday December 27, 2016 @11:00PM (#13268338)
Calling C from Go has significant overhead [1], doesn't that mean calling Go from C is equally slow?

[1] https://www.cockroachlabs.com/blog/the-cost-and-complexity-o...

Re:Rust vs C Pitfalls by hueving on Wednesday December 28, 2016 @04:00AM (#13269370)
It may be even worse calling Go from C since you are bring the whole Go runtime with GC and all when you call into Go.
Re:Rust vs C Pitfalls by TheDong on Tuesday December 27, 2016 @10:59PM (#13268332)
It's not quite simple because of the GC go brings.

As proof, notice that it barely happens, and only as an oddity in Go, yet in rust there are actual uses (e.g. ruby and python library optimization)

Re:Rust vs C Pitfalls by Zardoz84 on Wednesday December 28, 2016 @05:51AM (#13269742)
Like Dlang