On Wed, Sep 14, 2016 at 11:51 AM, 'simon place' via golang-nuts
wrote:
> what about when you're writing a lib, can't the importing code make use of
> constants?
No warning about an unused variable or constant would ever apply to an
exported name. That would not
what about when you're writing a lib, can't the importing code make use of
constants?
On Monday, 12 September 2016 13:57:15 UTC+1, Markus Zimmermann wrote:
>
> Hi gophers!
>
> I am wondering why we have a "declared and not used" compile error for
> variables
A difference:
- it isn't possible to derive the address of a named variable from the
address of another named variable
- it is possible to derive the value of a named const from another named
const
const (
a = 0 // b-1, c-2
b = 1 // a+1, c-1
c = 2 // a+2, b+1
)
Am Mittwoch, 14. September 2016 15:43:14 UTC+2 schrieb Markus Zimmermann:
>
> On Wednesday, September 14, 2016 at 3:37:10 PM UTC+2, Alan Donovan wrote:
>>
>> On 14 September 2016 at 09:32, Markus Zimmermann
>> wrote:
>>>
>>> Do you think this might be worth bringing up in
On Wed, Sep 14, 2016 at 6:43 AM, Markus Zimmermann wrote:
> On Wednesday, September 14, 2016 at 3:37:10 PM UTC+2, Alan Donovan wrote:
>>
>> On 14 September 2016 at 09:32, Markus Zimmermann wrote:
>>>
>>> Do you think this might be worth bringing up in
On Wednesday, September 14, 2016 at 3:37:10 PM UTC+2, Alan Donovan wrote:
>
> On 14 September 2016 at 09:32, Markus Zimmermann > wrote:
>>
>> Do you think this might be worth bringing up in golang-dev?
>>
>
> No. We can't make this change to the language without breaking
On Wednesday, September 14, 2016 at 3:47:29 PM UTC+2, Chris Hines wrote:
>
> On Monday, September 12, 2016 at 8:57:15 AM UTC-4, Markus Zimmermann wrote:
>>
>> Hi gophers!
>>
>> I am wondering why we have a "declared and not used" compile error for
>> variables
On Monday, September 12, 2016 at 8:57:15 AM UTC-4, Markus Zimmermann wrote:
>
> Hi gophers!
>
> I am wondering why we have a "declared and not used" compile error for
> variables [https://play.golang.org/p/KLzHVO5L7q] but not for constants [
> https://play.golang.org/p/JG9dSa_VKg]? I am sure
On 14 September 2016 at 09:32, Markus Zimmermann wrote:
>
> Do you think this might be worth bringing up in golang-dev?
>
No. We can't make this change to the language without breaking existing
programs.
--
You received this message because you are subscribed to the Google
On Tuesday, September 13, 2016 at 3:50:12 PM UTC+2, Alan Donovan wrote:
>
> On 13 September 2016 at 08:22, Markus Zimmermann > wrote:
>
>> On Monday, September 12, 2016 at 3:41:35 PM UTC+2, adon...@google.com
>> wrote:
>>>
>>> unused constants and types cost nothing at run
On 13 September 2016 at 08:22, Markus Zimmermann wrote:
> On Monday, September 12, 2016 at 3:41:35 PM UTC+2, adon...@google.com
> wrote:
>>
>> unused constants and types cost nothing at run time. It's not that
>> simple, of course, because constant and type declarations may
On Monday, September 12, 2016 at 3:21:50 PM UTC+2, Sjon Kosse wrote:
>
> Hello,
>
> Const values can be accesed still by reflection in a reasonable manner.
> This question has come by quite a few times before on the mailing list,
> better explanations should be easy to find.
>
I do not think
On Monday, September 12, 2016 at 3:41:35 PM UTC+2, adon...@google.com wrote:
>
> On Monday, 12 September 2016 08:57:15 UTC-4, Markus Zimmermann wrote:
>>
>> Hi gophers!
>>
>> I am wondering why we have a "declared and not used" compile error for
>> variables [https://play.golang.org/p/KLzHVO5L7q]
13 matches
Mail list logo