Closed
Description
by notan.kdev:
What steps will reproduce the problem? 1. Enter a list of numbers 1230, 0123, 3012, 2301 guess what went wrong. Starting octal number with a 0 prefix is a pain. You should make it a syntax error, or at least it is worth a warning. If somebody really needs octal allow 0o123 which is consistent to the hex notation 0x123 ( 0b0101 for binary would be handy sometimes, 0d0123 for decimal may make the syntax complete)
Activity
robpike commentedon Nov 13, 2009
Comment 1:
Status changed to LongTerm.
gopherbot commentedon Nov 15, 2009
Comment 2 by autophile:
gopherbot commentedon Nov 17, 2009
Comment 3 by JQBalter:
gopherbot commentedon Nov 18, 2009
Comment 4 by yukuku:
gopherbot commentedon Nov 18, 2009
Comment 5 by dschauer:
robpike commentedon Nov 18, 2009
Comment 6:
Status changed to WontFix.
gopherbot commentedon Nov 19, 2009
Comment 7 by FlyMyPG:
gopherbot commentedon Nov 19, 2009
Comment 8 by gherald:
jasonpfox commentedon Jun 15, 2016
I am just starting to work in Go and this is the first thing I have come across that appears as an actual bug in the language and I can't believe it had been reviewed and accepted "Won't Fix" just because others had jumped off that bridge before.
Talk about uncaught subtle errors ... 045 is a completely legitimate decimal number (and is even often written that way as a decimal in many forums, such as when talking about a course or heading among others). Interpreting a legitimate decimal constant as octal just because of a leading 0 is mathematically wrong and misleading, even if other languages have done that before.
ianlancetaylor commentedon Jun 15, 2016
@jasonpfox There is no point to having a discussion on a closed issue. See https://golang.org/wiki/Questions .
jasonpfox commentedon Jun 15, 2016
So how do we get the issue reopened?
Jason Fox
jpfox@alumni.rice.edu
On Wed, Jun 15, 2016 at 2:23 PM, Ian Lance Taylor notifications@github.com
wrote:
ianlancetaylor commentedon Jun 15, 2016
@jasonpfox Take it to a forum, as described in the link above.
But the issue will not get reopened, because changing anything in this area would break the Go 1 guarantee (https://golang.org/doc/go1compat.html).
griesemer commentedon Jun 15, 2016
See also the discussion in: #12711