digitalmars.D - Is binding to alias a definite superset of binding to a type
- Andrei Alexandrescu (8/8) May 25 2020 This seems to be an overlook:
- Stefan Koch (7/15) May 25 2020 It used to be the case that alias parameters could not bind basic
- Max Samukha (4/26) May 26 2020 Why can't basic types just be made symbols? They are symbols in
- Stefan Koch (3/31) May 26 2020 There is no fundamental reason (as far as I can see at least) why
- Meta (3/31) May 26 2020 It's a moot point since alias template parameters now accept
- Max Samukha (2/4) May 26 2020 Yes, with a ton of hacks in the implementation, I presume.
- Stefan Koch (7/12) May 26 2020 No it was a one line change.
- Max Samukha (2/8) May 26 2020 Then I need to shut up and look at the code.
- Nick Treleaven (4/6) Jun 04 2020 I made a pull to remove unnecessary overloads in std.meta, and
This seems to be an overlook: https://issues.dlang.org/show_bug.cgi?id=20863 Are there any non-bug cases showing different treatment of type parameters vs. alias parameters? I mean: template xyz(T) { ... } vs. template xyz(alias T) { ... } The second should "catch" everything the first does, and more.
May 25 2020
On Monday, 25 May 2020 at 20:58:56 UTC, Andrei Alexandrescu wrote:This seems to be an overlook: https://issues.dlang.org/show_bug.cgi?id=20863 Are there any non-bug cases showing different treatment of type parameters vs. alias parameters? I mean: template xyz(T) { ... } vs. template xyz(alias T) { ... } The second should "catch" everything the first does, and more.It used to be the case that alias parameters could not bind basic types. Because they are not symbols. However I gather that this issue has been "worked around" Therefore, an alias would bind to almost anything. including any type.
May 25 2020
On Monday, 25 May 2020 at 21:13:10 UTC, Stefan Koch wrote:On Monday, 25 May 2020 at 20:58:56 UTC, Andrei Alexandrescu wrote:Why can't basic types just be made symbols? They are symbols in more consistent languages (such as Haskell), where they are implicitly declared in a built-in namespace.This seems to be an overlook: https://issues.dlang.org/show_bug.cgi?id=20863 Are there any non-bug cases showing different treatment of type parameters vs. alias parameters? I mean: template xyz(T) { ... } vs. template xyz(alias T) { ... } The second should "catch" everything the first does, and more.It used to be the case that alias parameters could not bind basic types. Because they are not symbols. However I gather that this issue has been "worked around" Therefore, an alias would bind to almost anything. including any type.
May 26 2020
On Tuesday, 26 May 2020 at 11:33:04 UTC, Max Samukha wrote:On Monday, 25 May 2020 at 21:13:10 UTC, Stefan Koch wrote:There is no fundamental reason (as far as I can see at least) why they couldn't be.On Monday, 25 May 2020 at 20:58:56 UTC, Andrei Alexandrescu wrote:Why can't basic types just be made symbols? They are symbols in more consistent languages (such as Haskell), where they are implicitly declared in a built-in namespace.This seems to be an overlook: https://issues.dlang.org/show_bug.cgi?id=20863 Are there any non-bug cases showing different treatment of type parameters vs. alias parameters? I mean: template xyz(T) { ... } vs. template xyz(alias T) { ... } The second should "catch" everything the first does, and more.It used to be the case that alias parameters could not bind basic types. Because they are not symbols. However I gather that this issue has been "worked around" Therefore, an alias would bind to almost anything. including any type.
May 26 2020
On Tuesday, 26 May 2020 at 11:33:04 UTC, Max Samukha wrote:On Monday, 25 May 2020 at 21:13:10 UTC, Stefan Koch wrote:It's a moot point since alias template parameters now accept built in types.On Monday, 25 May 2020 at 20:58:56 UTC, Andrei Alexandrescu wrote:Why can't basic types just be made symbols? They are symbols in more consistent languages (such as Haskell), where they are implicitly declared in a built-in namespace.This seems to be an overlook: https://issues.dlang.org/show_bug.cgi?id=20863 Are there any non-bug cases showing different treatment of type parameters vs. alias parameters? I mean: template xyz(T) { ... } vs. template xyz(alias T) { ... } The second should "catch" everything the first does, and more.It used to be the case that alias parameters could not bind basic types. Because they are not symbols. However I gather that this issue has been "worked around" Therefore, an alias would bind to almost anything. including any type.
May 26 2020
On Tuesday, 26 May 2020 at 16:04:17 UTC, Meta wrote:It's a moot point since alias template parameters now accept built in types.Yes, with a ton of hacks in the implementation, I presume.
May 26 2020
On Tuesday, 26 May 2020 at 16:16:26 UTC, Max Samukha wrote:On Tuesday, 26 May 2020 at 16:04:17 UTC, Meta wrote:No it was a one line change. DMD is much better and handling wired ASTs than you give it credit for. The overload resolution was changed to accept types on the matching level convert That's it.It's a moot point since alias template parameters now accept built in types.Yes, with a ton of hacks in the implementation, I presume.
May 26 2020
On Tuesday, 26 May 2020 at 18:49:05 UTC, Stefan Koch wrote:No it was a one line change. DMD is much better and handling wired ASTs than you give it credit for. The overload resolution was changed to accept types on the matching level convert That's it.Then I need to shut up and look at the code.
May 26 2020
On Monday, 25 May 2020 at 20:58:56 UTC, Andrei Alexandrescu wrote:This seems to be an overlook: https://issues.dlang.org/show_bug.cgi?id=20863I made a pull to remove unnecessary overloads in std.meta, and ran into this bug. Maybe you found it doing the same? https://github.com/dlang/phobos/pull/7513
Jun 04 2020