Poll: Would you like to try const-by-default or not?

Thomas Kuehne thomas-dloop at kuehne.cn
Sun Jun 10 13:18:31 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarrett Billingsley schrieb am 2007-06-10:
> This is not a discussion thread.  I think we've discussed enough.  :)
>
> Basically there are these possible const implementations (there are others, 
> but for the sake of simplicitly, I'll keep this poll to 2):
>
> 1) C++ style const, where you mark anything that should be const as such.
>
> 2) Parameters are const-by-default, and must be marked mutable otherwise. 
> Locals, fields etc. are still mutable by default.

2) const-by-default

I think that const-by-default would result in less complex functions - and
thus much more maintainable ones - than mutable-by-default. This impression
is based what I've see in C++ code, however there are so many factors at
play that a statistical prove is very difficult if not impossible.

Thomas


-----BEGIN PGP SIGNATURE-----

iQIVAwUBRmxkBbZlboUnBhRKAQK+vRAAg/x3P3xFt1T+BPRnT6kzuHmKfcJwJmUA
xJ1IbOVAfsnXYXSQxAXWiMFtTS1BSG35BgmloiXzuQJBtzk/c8FvleVt9BumU646
68MRo5rNQJUm02t8ujAM8ADEC3MnjKv7dV5e6zc0OwvFcFv10b4+SV2hdOu3nL3z
ASLu57ZYFwOvC6VXKYgKdZK3ym7qyGRh5wledKFuh+nXX+KC3BHJTirmEHMr1eyb
YvOi384ILxfOZhiyUdMgfS9QUB6cIb+SsLx78g3yXM6kj1QRd/vjgyKv3Q+zlQTh
mRlfIB9VUjJvBWy7tgnxuv/9z3QyXDCG2vvGgGI1AkQMeTu3zSuabAGwytdYrRrv
z18BxdMrYGF08C1pHDieWs+3+xV7Zkid3iXpBr6qrDiddpnzr0XdSW5Xju1M3+iN
vKtP7TMh1Mi7+UavuHMKUZz3rX8clq1ewlt+U6ni7VznxumQ3PrUKr8MTfjnNhIe
cpI6szL4pD82heI26LOzjxp05gAeeAcaYidTgqfCW0j/D90tsPkL4UN+gHB7ha25
B/ZDc7viHYTdRXkkc/GgXKE4PZEbnHp508n1iT/PxTg3qT9lIEaED42aaeKZ40e/
PGJriUljKwjkHi1wV9GLPDkbDylAdpL2GCjopP5d0sTpb7FTTZTD2s56kG/grOFM
dUv+HrALFwQ=
=AK6Q
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list