Convenient debug printing

Olivier FAURE couteaubleu at gmail.com
Sat Feb 2 12:14:47 UTC 2019


On Friday, 1 February 2019 at 23:50:04 UTC, jmh530 wrote:
> In general, the rvalue DIP makes pretty clear that Walter and 
> Andrei have a high bar for the quality of a DIP, particularly 
> one that could have a big impact on the language. I don't think 
> the old AST macro DIP is probably up to the standard that would 
> be needed at this point regardless. It would need a re-work and 
> definitely need to be written from the perspective of 
> convincing W&A, which is a pretty high hurdle given their 
> biases.

While you're being more charitable than most people I've seen on 
the forum, I think this isn't a constructive approach to dealing 
with language maintainers.

A lot of people on the forum are essentially treating the 
maintainers as living obstacles to be worked around, not people 
to work with, which:

- Is kind of disrespectful in the first place.
- Excludes them from the discussion, instead of trying to improve 
communication.
- Asks the wrong question: "How can we convince them?" instead of 
"What is best for the language, and how does that overlap with 
their opinion?"

I'm not saying they're always right, mind you.

But to get back to AST macros, I think it would be more 
constructive to look at the positive aspects of macros, the 
intended use cases, examples from other languages where macros 
are useful, etc... and *also* look at their drawbacks, 
investigate the problems they can create, probably ask Walter and 
Andrei for an exhaustive list of objections, ideally examples of 
problematic code...

Then, when it comes to writing a DIP, try to propose something 
that covers the intended use cases in an elegant way *without* 
hitting the drawbacks they're worried about. The DIP shouldn't be 
"That thing you already refused except this time it's going to 
convince you despite your biases!", because that's not an 
intellectually honest way to proceed.

I don't think I'm saying anything crazy either. Most use cases 
for AST macros in other languages are already covered by D's 
template system. It might be possible to get the most popular use 
cases (eg smart assertions) by just giving templates more power.


More information about the Digitalmars-d mailing list