On 07/12/2016 02:37 PM, deadalnix wrote:
On Tuesday, 12 July 2016 at 14:17:30 UTC, Andrei Alexandrescu wrote:
Indeed I'm not the sharpest tool in the shed, and since it's already
been established I'm the idiot and you're the wise man
(congratulations - surely enough the great work to substantiate that
is very soon to follow) in the proverb, I hope you'll allow me one
more pedestrian question.
Proverb are not meant to be interpreted literally.
Also proverbs are not licenses for people to be jerks.
So I've been looking through this thread for the five examples of what
you're talking about (which to my mind is "@safe is just a
convention") and the closest I could find is your post on
http://forum.dlang.org/post/[email protected].
So there you discuss the inconsistency of "alias" which as far as I
understand has nothing to do with safety. Then we have:
enum E { A = 1, B = 2 }
E bazinga = A | B;
final switch (bazinga) { case A: ... case B: ... } // Enjoy !
which I pasted with minor changes here:
https://dpaste.dzfl.pl/b4f84374c3ae. I'm unclear how that interacts
with @safe. It could, if the language would allow executing unsafe
code after the switch. But it doesn't. Could you please clarify? And
could you please point to the other examples?
Thanks,
Andrei
My point has nothing to do with safety, and this is why various example
have nothing to do with safety. Safety was an example. The enum/final
switch thing was another. The alias thing again one more.
Where are the others?
Andrei