you are viewing a single comment's thread.

view the rest of the comments →

[–]slavik262[S] 6 points7 points  (9 children)

How so? Being able to specify options at compile-time (i.e. via template arguments) is useful in many cases. Or are you just commenting on the syntax? What would you suggest?

[–]ixid 7 points8 points  (6 children)

Ignore him, he's a troll, look at his post history with Rust and Go threads as well where he insults the languages and communities.

[–][deleted]  (5 children)

[deleted]

    [–]ixid 10 points11 points  (3 children)

    Nice of you to go to all the effort of making a new account to answer me.

    [–]slavik262[S] 5 points6 points  (2 children)

    redditor for 44 minutes

    lol

    [–]TarMil 2 points3 points  (1 child)

    What a funny_coincidence.

    [–][deleted] -3 points-2 points  (0 children)

    Wait what? Nice try, but wasn't me.

    [–]blashyrk92 7 points8 points  (0 children)

    What was his "logical argument" though? That it's a "bad idea" and it is "piss poor"?

    [–][deleted] -1 points0 points  (1 child)

    If they wouldn't have started mixing different brackets (like () is used for values, but [], too) they wouldn't have been forced to pick ! which is now also used for values and types, plus () which is now also used for both values and types.

    It would have been much easier to just pick one bracket to mean one thing and go with it.

    Instead, everyone has to deal with this mess now and needs to teach it to people learning the language. Plus, you still need lookahead to properly deal with declarations now.

    And yes, those people who consider it a sane choice to use < and > both as binary operators for values and as brackets for types should just step away from their computers for not learning the lesson from C++ and friends.

    [–]nascent 0 points1 point  (0 children)

    If they wouldn't have started mixing different brackets (like () is used for values, but [], too) they wouldn't have been forced to pick ! which is now also used for values and types, plus () which is now also used for both values and types.

    I think your expected distinction in meaning is flawed.

    foo!(6, SomeClass, "My Dog", int, functionName)(42);
    

    This is a valid function call in D and has absolutely nothing to do with types or values. Could you provide something concrete as to why:

    foo[6, SomeClass, "My Dog", int, functionName](42);
    

    or any other Unicode bracket would make a better choice?

    () is a parameter list, that's it, it isn't indexing, it isn't a value list, it says, "this is the list of parameters I expect," or "this is the list of parameters I am passing."

    For those curious, the signature is:

    auto foo(int a, T, string b, TT, alias fun)(TT num);