Comment by kccqzy
7 hours ago
No a language doesn’t need it. It’s an educational tool for those new to the language or new to a particular language feature. With practice language features just become automatic so you don’t think about them when thinking about a problem.
In the README example, the C++ practitioner just doesn’t think about those automatically synthesized copy constructors and such for POD types, nor do they think about the fact that assignment is desugared to operator= or that an assignment can involve a static_cast.
>> needs (or at least is of good use) such a tool.
Of course there are people who do not need that tool. The thing is, other languages doesn’t need such an explanation tool at all, is very much enough with reading a small book. I personally would like C++ to not really need it, but clearly as I stated: maybe “the only one”
> other languages doesn’t need such an explanation tool at all
Plain old C has -E to expand macros. Rust has cargo expand. Haskell has -ddump-simpl. Common Lisp has macroexpand. Any language that has a complicated syntax or allows the user to customize the syntax needs such a tool. Whether such a tool actually exists reflects more on popularity and community desire.
>other languages doesn’t need such an explanation tool at all
Are you sure about that?