Yeah while I reach for them often I usually only see benefits in a few cases
final switch(some enum)
This means all enum values must have a case, no default.
switch (arg) { static foreach(...) Case t....
Now I can build my cases at Compile time and don't need to hand the first if or start with else.
But these are only things you find in D.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah while I reach for them often I usually only see benefits in a few cases
final switch(some enum)
This means all enum values must have a case, no default.
Now I can build my cases at Compile time and don't need to hand the first if or start with else.
But these are only things you find in D.