migration to new octal integer literals

158 views
Skip to first unread message

Manlio Perillo

unread,
Apr 13, 2021, 8:38:20 AM4/13/21
to golang-dev
The  number literal proposal has been implemented in Go 1.13, however the standard library still use the old syntax.  Is there no plan to migrate to the new syntax?

Thanks
Manlio

Rob Pike

unread,
Apr 13, 2021, 10:41:16 AM4/13/21
to Manlio Perillo, golang-dev
I like the old syntax, and it's still a valid syntax. There is no need to migrate.

-rob


--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/87136d91-78cc-4061-95dd-4f63e89e0d3fn%40googlegroups.com.

Keith Randall

unread,
Apr 13, 2021, 10:46:50 AM4/13/21
to Rob Pike, Manlio Perillo, golang-dev
Also keep in mind that we still need to bootstrap from 1.4, at least until #44505 happens.

Manlio Perillo

unread,
Apr 13, 2021, 11:07:43 AM4/13/21
to golang-dev
The problem is that if the new syntax is not used in the standard library (notably in the standard library documentation) and is not used in the official documentation (https://golang.org/doc/) then probably nobody will start to use it.

Thanks
Manlio

Caleb Spare

unread,
Apr 13, 2021, 1:09:16 PM4/13/21
to Manlio Perillo, golang-dev

I think that enforcing the style in gofmt will be far more effective than leading by example in the standard library.

Jan Mercl

unread,
Apr 13, 2021, 1:22:00 PM4/13/21
to Caleb Spare, Manlio Perillo, golang-dev
On Tue, Apr 13, 2021 at 7:09 PM Caleb Spare <ces...@gmail.com> wrote:

> See also https://github.com/golang/go/issues/33363.
>
> I think that enforcing the style in gofmt will be far more effective than leading by example in the standard library.

That's the moment I would stop using gofmt, fork and use the old
non-enforcing one. And I might not be the only one.

The main purpose of gofmt is to adjust the _white space_ of source
code, not to dictate if I can use write 0600 or not.
Reply all
Reply to author
Forward
0 new messages