operators in language reference
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 1 06:16:28 PDT 2015
On Wednesday, 1 April 2015 at 12:40:26 UTC, Dominikus Dittes
Scherkl wrote:
> On Wednesday, 1 April 2015 at 11:18:26 UTC, John Colvin wrote:
>> On Wednesday, 1 April 2015 at 10:53:57 UTC, Dominikus Dittes
>> Scherkl wrote:
>>> On Wednesday, 1 April 2015 at 10:39:01 UTC, John Colvin wrote:
>>>> On Wednesday, 1 April 2015 at 10:06:20 UTC, Dominikus Dittes
>>>> Scherkl wrote:
>>>>> There is a gapping hole in the language reference: The
>>>>> operators are nowhere described.
>>>>> Ok, most of them are the same as in C and C++, but there
>>>>> are subtle differences (e.g. different precedence) and some
>>>>> are new (the floating point comparisons have their own
>>>>> chapter and they are about to beeing deprecated, but what
>>>>> about >>>, ^^, ^^=, =>, ., is, in ?).
>>>>> And even if they where all the same as in C or C++, not
>>>>> everybody comes from those languages and D should be
>>>>> understandable without such kind of background knowledge, I
>>>>> think.
>>>>
>>>> http://dlang.org/expression.html
>>> This describes what operators (tokens) exist and what
>>> operands they can take
>>> (form a grammar point of view), but not what they do. You may
>>> say that's obvious, but I know languages where even "+"
>>> doesn't do what one might expect.
>>
>> With exception of the ones that are the same in C, I can't
>> spot any that are missing an explanation.
>>
>> I agree that it would be good to have a more beginner friendly
>> description of them all, but to a C(++) programmer I would say
>> that document contains the info they need.
>
> Yeah, but scattered all over the different chapters.
I meant just in http://dlang.org/expression.html. All the novel
operators are described there, including what they do.
> And not describing those that are the same in C++ is like not
> describing the types float and short, just because they are the
> same in C++. I find it lacking if I have to tell a newbie "look
> in the documentation for some other language for the definition
> of the operators that you can't find here somewhere"
Agreed.
More information about the Digitalmars-d
mailing list