Re: Thoughts on Herb Sutter's Metaclasses?
On Tuesday, 10 April 2018 at 09:32:49 UTC, Chris Katko wrote: Wow, that thread had very little discussion, and a huge amount of bickering over whether someone actually understood what someone else might have said. My take-away was that it can be done in D, but would be simpler with AST macros and Walter is against AST macros.
Re: Thoughts on Herb Sutter's Metaclasses?
On Tuesday, 10 April 2018 at 09:32:49 UTC, Chris Katko wrote: On Tuesday, 10 April 2018 at 05:55:06 UTC, Joakim wrote: On Tuesday, 10 April 2018 at 01:21:07 UTC, Chris Katko wrote: [...] See previous forum thread on the topic, with Walter chiming in a bit too: https://forum.dlang.org/thread/kglnxqbcugerhynng...@forum.dlang.org Wow, that thread had very little discussion, and a huge amount of bickering over whether someone actually understood what someone else might have said. ...I'm sorry?
Re: Thoughts on Herb Sutter's Metaclasses?
On Tuesday, 10 April 2018 at 05:55:06 UTC, Joakim wrote: On Tuesday, 10 April 2018 at 01:21:07 UTC, Chris Katko wrote: [...] See previous forum thread on the topic, with Walter chiming in a bit too: https://forum.dlang.org/thread/kglnxqbcugerhynng...@forum.dlang.org Wow, that thread had very little discussion, and a huge amount of bickering over whether someone actually understood what someone else might have said.
Re: Thoughts on Herb Sutter's Metaclasses?
On Tuesday, 10 April 2018 at 01:21:07 UTC, Chris Katko wrote: One more note: It seems like this would be heaven for trying out new language features without having to "manually" add them into the compiler first. By hijacking the syntax to AST stage, we can add new constructs with real-functioning code, and have others evaluate themselves and unit test them without having to "imagine" whether the code would actually work. It'd be on a real binary, using a real (unmodified!) compiler. And you can also have your own "in-house" specializations. Which is no different than expecting people to use your API. Some API's have method chaining, and you use it. Some have pass-by-name, and you use it. See previous forum thread on the topic, with Walter chiming in a bit too: https://forum.dlang.org/thread/kglnxqbcugerhynng...@forum.dlang.org
Re: Thoughts on Herb Sutter's Metaclasses?
One more note: It seems like this would be heaven for trying out new language features without having to "manually" add them into the compiler first. By hijacking the syntax to AST stage, we can add new constructs with real-functioning code, and have others evaluate themselves and unit test them without having to "imagine" whether the code would actually work. It'd be on a real binary, using a real (unmodified!) compiler. And you can also have your own "in-house" specializations. Which is no different than expecting people to use your API. Some API's have method chaining, and you use it. Some have pass-by-name, and you use it.