A minor modification to that; if the const declaration is done as shown
here https://play.golang.org/p/CkztBS-Wkvm you get the constants
rendered near the type rather than at the top of the godoc page.
On Thu, 2018-09-06 at 09:58 +1000, Nigel Tao wrote:
> You can implement a String method on that
On Thu, Sep 6, 2018 at 12:22 AM Eric Raymond wrote:
> Matters in my case because the deserialization of a repository history can
> contain hundreds of thousands of constants like "M", "D", "R", and "C"
> representing fast-export stream file operation types. I could intern them
> explicitly but
On Wednesday, September 5, 2018 at 10:38:16 AM UTC-4, Jan Mercl wrote:
>
> On Wed, Sep 5, 2018 at 4:23 PM Eric Raymond > wrote:
>
> > Matters in my case because the deserialization of a repository history
> can contain hundreds of thousands of constants like "M", "D", "R", and "C"
> > represent
On Wed, Sep 5, 2018 at 4:23 PM Eric Raymond wrote:
> Matters in my case because the deserialization of a repository history
can contain hundreds of thousands of constants like "M", "D", "R", and "C"
> representing fast-export stream file operation types. I could intern them
explicitly but it avoi
On Wednesday, September 5, 2018 at 10:12:51 AM UTC-4, Jan Mercl wrote:
>
> On Wed, Sep 5, 2018 at 4:00 PM Eric Raymond > wrote:
>
> > If I have multiple occurrences of a string constant in source code -
> say, "M" - can I count on the compiler to create one static instance and
> pass reference
On Wed, Sep 5, 2018 at 4:00 PM Eric Raymond wrote:
> If I have multiple occurrences of a string constant in source code - say,
"M" - can I count on the compiler to create one static instance and pass
references to it everywhere?
It's unspecified, so strictly speaking you cannot. (Also, everythin
If I have multiple occurrences of a string constant in source code - say,
"M" - can I count on the compiler to create one static instance and pass
references to it everywhere?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from