The ones in the compiler were initially implemented in C. They were 
converted to Go for go1.5.

The others were created to build tools in Go like gofmt.

On Wednesday, July 19, 2017 at 5:54:13 PM UTC+2, Eddie Ringle wrote:
>
> It's not particularly likely that cmd/compile/internal/gc will be
>> replaced by go/parser, go/ast, and friends.  The packages are
>> optimized in different ways for different purposes. 
>
>
> I was wondering about this separation as well. Is there an article or wiki 
> somewhre that expands on the reasoning behind it? It seems 
> counter-intuitive to essentially model the same tokenizer/parser/AST twice.
>
> On Wed, Jul 19, 2017 at 9:56 AM, Hajime Hoshi <hajim...@gmail.com 
> <javascript:>> wrote:
>
>> Sorry for my super late reply, and thank you for answering!
>>
>> On Tue, Jun 27, 2017 at 12:41 AM Ian Lance Taylor <ia...@golang.org 
>> <javascript:>> wrote:
>>
>>> On Mon, Jun 26, 2017 at 2:39 AM, Hajime Hoshi <hajim...@gmail.com 
>>> <javascript:>> wrote:
>>> >
>>> > It looks like package cmd/compile/internal/gc includes tokenizer, 
>>> parser or
>>> > others for completion, and there are also other packages like 
>>> go/parser,
>>> > go/ast and so on for the same features. As gc code looks likes pretty 
>>> old
>>> > (this was converted from C at Go 1.5 AFAIR), will this be replaced 
>>> with go/*
>>> > packages in the future?
>>>
>>> It's not particularly likely that cmd/compile/internal/gc will be
>>> replaced by go/parser, go/ast, and friends.  The packages are
>>> optimized in different ways for different purposes.  It is likely that
>>> cmd/compile/internal/gc will continue to be rewritten and improved
>>> from its original C roots.  There was a lot of work on that in the 1.9
>>> cycle, and it will continue.
>>>
>>> Ian
>>>
>> -- 
>> 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...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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.

Reply via email to