June 08, 2015
On 06/08/2015 05:15 PM, ketmar wrote:
> On Mon, 08 Jun 2015 15:46:22 +0200, Timon Gehr wrote:
>
>> It indicates to the parser that what follows is a declaration. Nothing
>> more. It does not hold the place of anything else.
>
> so it's not a "default storage type", but simply "a mark for a parser".
> well, the third definition.
>

That's not a definition. It is a rationale.
June 09, 2015
On Mon, 08 Jun 2015 15:30:24 +0000, Marc Schütz wrote:

> On Monday, 8 June 2015 at 15:09:21 UTC, ketmar wrote:
>> On Mon, 08 Jun 2015 15:47:33 +0200, Timon Gehr wrote:
>>
>>> On 06/08/2015 03:11 PM, ketmar wrote:
>>>> so specifying two storage classes are sometimes valid and sometimes invalid. a perfect consistency!
>>> 
>>> The compiler sometimes compiles the program and sometimes terminates with an error message instead. That's life.
>>
>> yeah. "you can't logically deduce it, you have to remember it!" that's the way to success.
> 
> That's only if you're talking about the details of the grammar. But for everyday use (even advanced use!) of the language, these are not important. You _don't_ "have to remember it", because you simply don't need it. Noone forces you to write `auto const`, and it gives you no advantages over just `const`. But if you really feel an urge to use strange combinations of storage classes and type modifiers, just do it, and the compiler will tell you whether it's good or not. No need to remember anything. OTOH, if you encounter such a combination in someone else's code, it's still pretty obvious what it means. No problem there either.

i'll keep citing `foreach (auto i)` thingy. it can't be deduced by using the knowledge of other language constructs, it can be only remembered. the less things one can't deduce language has, the better.

June 09, 2015
On 06/09/2015 11:11 AM, ketmar wrote:
> On Mon, 08 Jun 2015 15:30:24 +0000, Marc Schütz wrote:
>
>> On Monday, 8 June 2015 at 15:09:21 UTC, ketmar wrote:
>>> On Mon, 08 Jun 2015 15:47:33 +0200, Timon Gehr wrote:
>>>
>>>> On 06/08/2015 03:11 PM, ketmar wrote:
>>>>> so specifying two storage classes are sometimes valid and sometimes
>>>>> invalid. a perfect consistency!
>>>>
>>>> The compiler sometimes compiles the program and sometimes terminates
>>>> with an error message instead. That's life.
>>>
>>> yeah. "you can't logically deduce it, you have to remember it!"
>>> that's the way to success.
>>
>> That's only if you're talking about the details of the grammar. But for
>> everyday use (even advanced use!) of the language, these are not
>> important. You _don't_ "have to remember it", because you simply don't
>> need it. Noone forces you to write `auto const`, and it gives you no
>> advantages over just `const`. But if you really feel an urge to use
>> strange combinations of storage classes and type modifiers, just do it,
>> and the compiler will tell you whether it's good or not. No need to
>> remember anything. OTOH, if you encounter such a combination in someone
>> else's code, it's still pretty obvious what it means. No problem there
>> either.
>
> i'll keep citing `foreach (auto i)` thingy. it can't be deduced by using
> the knowledge of other language constructs, it can be only remembered.
> the less things one can't deduce language has, the better.
>

http://en.wikipedia.org/wiki/Lambda_calculus
June 09, 2015
On Tue, 09 Jun 2015 13:09:22 +0200, Timon Gehr wrote:

>> i'll keep citing `foreach (auto i)` thingy. it can't be deduced by using the knowledge of other language constructs, it can be only remembered. the less things one can't deduce language has, the better.
>>
>>
> http://en.wikipedia.org/wiki/Lambda_calculus

what i should see there? will it explain to me why `while (i)` doesn't introduce new variable? ah, there is no ";" after it! ok, well, it's very human-friendly.

1 2 3 4 5 6 7
Next ›   Last »