February 08, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright Attachments:
| On Thu, Feb 7, 2013 at 7:33 PM, Walter Bright <newshound2@digitalmars.com>wrote: > > I haven't paid attention to those usages, so I don't have anything informed to say about it. > So what was it about C++ that made it a bad choice to use < > for template parameters (honest question). Was it because it also overloads the << and >> operators? -- Ziad |
February 08, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ziad Hatahet | On 2/7/2013 8:48 PM, Ziad Hatahet wrote:
> So what was it about C++ that made it a bad choice to use < > for template
> parameters (honest question). Was it because it also overloads the << and >>
> operators?
Grammatical ambiguities which require semantic analysis to figure out, such as:
a < b < c >> 3
|
February 08, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 2/7/13 10:33 PM, Walter Bright wrote:
> On 2/7/2013 6:52 PM, Ziad Hatahet wrote:
>> On Mon, Feb 4, 2013 at 9:38 AM, Walter Bright <newshound2@digitalmars.com
>> <mailto:newshound2@digitalmars.com>> wrote:
>>
>>
>> C++'s use of < > for template parameters is not forgivable because many
>> people correctly predicted its problems at the time.
>>
>>
>> Does that also apply to Java and C#? :)
>>
>
> I haven't paid attention to those usages, so I don't have anything
> informed to say about it.
Java and C# don't allow expression template parameters, so < and > are harmless in those languages. However, the choice does lock them out of adding expression parameters later.
Andrei
|
February 09, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Maxim Fomin | On Monday, 4 February 2013 at 06:11:49 UTC, Maxim Fomin wrote:
> On Sunday, 3 February 2013 at 12:53:19 UTC, SomeDude wrote:
>> It seems to me that the C experts crowd is the most conservative crowd you can find, and one that loves to impose its own masochism to the rest of the world.
>
> Good catch. But I see slightly different way. Old C programmers are experts in some fields and do not follow cool and idiotic ideas in programming languages.
Well, even Brian Kernighan said recently: "Avoid the preprocessor".
|
February 09, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to SomeDude | On Saturday, 9 February 2013 at 18:47:00 UTC, SomeDude wrote:
> On Monday, 4 February 2013 at 06:11:49 UTC, Maxim Fomin wrote:
>> On Sunday, 3 February 2013 at 12:53:19 UTC, SomeDude wrote:
>>> It seems to me that the C experts crowd is the most conservative crowd you can find, and one that loves to impose its own masochism to the rest of the world.
>>
>> Good catch. But I see slightly different way. Old C programmers are experts in some fields and do not follow cool and idiotic ideas in programming languages.
>
> Well, even Brian Kernighan said recently: "Avoid the preprocessor".
Correction to the above, he said: "avoid macros"
|
Copyright © 1999-2021 by the D Language Foundation