February 08, 2013
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
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
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
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
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"
1 2 3 4 5
Next ›   Last »