Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Sounds like it has the equivalent of a few make rules written for you

No. It sounds like the `go` tool is aware of how to compile different pieces of code for different architectures.

> but you could do exactly the same thing in C - and you can also inline assembly in your C source file.

Why does this make C easier? Does C automatically choose the correct target architecture for every piece of Assembly you write?



>Why does this make C easier?

It gives you more options. It makes it more practical to interleave C and assembly at a very granular level, whereas it sounds like you can only do it at the function level or coarser in go.

>Does C automatically choose the correct target architecture for every piece of Assembly you write?

No. I won't deny that go has a good build system, but I'm more interested in the language.


> Why does this make C easier?

Inlining some assembly where you need it - interacting with C variables, etc. - is definitely the most convenient thing.

Of course, if you don't want that, you can just put the assembly code in a separate function, also very easy to do with C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: