precedence of cast
Denis Koroskin
2korden at gmail.com
Wed Aug 27 09:40:41 PDT 2008
On Wed, 27 Aug 2008 20:32:57 +0400, Fawzi Mohamed <fmohamed at mac.com> wrote:
> On 2008-08-27 18:14:40 +0200, "Manfred_Nowak" <svv1999 at hotmail.com> said:
>
>> Fawzi Mohamed wrote:
>>
>>> A table with the precedence of all operators would be welcome
>> If a table is needed, it suggests itself to not rely on yourself and
>> others to know the contents of that table. Use parens and everyone sees
>> the intention.
>
> I agree that in general it is a good advice, but if you have an
> expression that you need to use often, some optimization is in order,
> because (being it common in your code) excessive parens just weight it
> down and, whoever looks at your code will have to understand it once, to
> then apply it in all cases.
>
> And anyhow, just for the sake of knowing it I would like someplace where
> I can look at it. :)
>
> Fawzi
>> -manfred
>
>
That's generally a good idea to have such a table, to reduce number of
trial and error, for example.
More information about the Digitalmars-d-learn
mailing list