Re: [go-nuts] Re: How does the Golang compiler handle dependencies?

2020-11-15 Thread kev kev
le interface, can be compiled once and then reused to compile > object files without recompiling the same source code for every unit. > > Regarding how packages compilation actually works in Go - this is an > interesting topic. I'm afraid i won't be able to explain it more or >

Re: [go-nuts] Re: How does the Golang compiler handle dependencies?

2020-11-13 Thread kev kev
; > On Nov 13, 2020, at 7:18 PM, kev kev wrote: > >  > > > Thanks for the answer. If C/C++ has object files, is it not possible to > see “something.h” and then fetch the corresponding object file? > > With go, if I import “package something” and that package imports anoth

[go-nuts] Re: How does the Golang compiler handle dependencies?

2020-11-13 Thread kev kev
.go are both in the same package (e.g. in the same > directory), code in a.go can call code in b.go without explicitly declaring > anything. So before the code in a.go can be fully compiled into an object > file, b.go must be considered as well. > On Friday, November 13, 202

[go-nuts] How does the Golang compiler handle dependencies?

2020-11-13 Thread kev kev
I recently read the post by Rob Pike about language choices for Golang: https://talks.golang.org/2012/splash.article#TOC_5. The seventh point refers to how Golang handles dependencies. It mentions an "object file" for packages that a _dependent_ reads. Below I go through my interpretation of th