*how can make a new compiler programming language using c without assembly?(a compiler then can produce executable file) ??* On Wednesday, December 13, 2017 at 3:19:58 PM UTC+3:30, Chris Hopkins wrote: > > You keep asking the same question, I think we have a misunderstanding > here. To grossly simplify: > > Way back when, the first C compilers were written in Assembly. Then > someone produced a C compiler that was written in C. Now you use a C > compiler to build a C compiler. > Some time ago the go compiler was written in C. Then someone produced a Go > compiler that was written in Go. Now you use a Go compiler to build a Go > compiler. > > In the same way you can compile a C compiler with a C compiler, now once > you have a Go compiler you can make a new Go compiler. > Yes, you need a C compiler to make the very first Go compiler, but you > also need a C compiler to make a C compiler. Unless you have the very first > C compiler that was written in Assembler.* > > But you now have an assembly version of the Go compiler for all popular > platforms. So you can just download that, > If you want it for an unpopular platform, then cross-compile. > If you don't want to do that, then use a C compiler to build an early > version of the Go compiler; then use that to build a modern version of the > go compiler. > > Does that make sense? > > * I believe the actual first C compiler was written in another language, > but as I'm a hardware engineer, not a software historian :-) > > Chris > > On Wednesday, 13 December 2017 11:30:53 UTC, erfang...@gmail.com wrote: >> >> ?!! how may be? >> a software , for this then generate a binary file. need Asm or >> Assembler.... or another Compiler. >> >> if gocompiler not use c-compiler for generate binary file.(for a test >> hello world golang appliaction) >> >> so GoCompiler how generate binary file for any platform?! >> >> may be explain me how gocompiler work?! >> >> On Wednesday, December 13, 2017 at 4:41:03 AM UTC+3:30, Bruno Albuquerque >> wrote: >>> >>> No the compiler does not generate C code. The compiler compiles Go code >>> to the actual final binary. >>> >>
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.