* n...@mit.edu <n...@mit.edu> [180814 09:47]:
> The documentation for parser.ParseExpr says that the position information 
> in the AST it returns "is undefined".  I opserved the result as having 
> position information.  This looks like a bug.
> 
> https://play.golang.org/p/tpzqDF3EZ_S
> 
> demonstrates this bug.

Why would you say this is a bug?  The documentation explicitly says the
position information is "undefined".  Undefined means that you might get
a value, but the value will be nonsense.  The value might coincidentally
be relevant, but you cannot rely on it because you will not be able to
determine whether it is nonsense, coincidentally relevant and correct,
or coincidentally relevant and incorrect.

Obtaining a coincidentally relevant and correct value for something that
is defined to be "undefined" is not a bug; it just happens sometimes.

"Undefined" may also be used when the current code returns something
correct, but the authors wish to reserve the right (i.e. not break Go 1
Compatibility) to change the implementation in a way that does not give
a meaningful value.

...Marvin

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