Using closure in function scope to make "real" private class members
zjh
fqbqrr at 163.com
Tue Jun 7 08:45:49 UTC 2022
On Tuesday, 7 June 2022 at 07:50:27 UTC, Ola Fosheim Grøstad
wrote:
> D should solve its «big» problems and ignore «small problems».
`Hard core` programmers are responsible for `difficult problems`,
and ordinary people are responsible for `simple problems`.
This is not an unimportant issue. It will destroy the
`encapsulation`.
As long as it is `' reasonable '` and can meet the `' needs'` of
different people, it is no big deal to add it. `'d '` needs to
meet people's `needs` first, and then slowly solve `big or
difficult` problems.
`Class privacy` is an important and simple problem.
If you solve it, you can attract `c++ users` easily.
`Encapsulation of classes` is essential for me. if `D` don't
provide it, it just makes me `unhappy `.
If `c++` programmers think so, why do they use d?
Obviously, just adding a piece of code solves the `user's` needs.
The `success` of c++ is to constantly meet the `needs` of
different people. Look at the latest `rust` and `other
languages`. Which is not `complicated`? Even `'go'` has added
'generic'.
More information about the Digitalmars-d
mailing list