MV Why do so many people add a break after return in switch statements

I've seen something like this example so often now, that I just need to ask:

JavaScript:
MyPlugin.doConvertNumberToSomething = function(value)
{
    switch(MyPlugin.Param.ConversionOption)
    {
        case "Option 1":
            return MyPlugin.convertOption1(value);
            break;
        case "Option 2":
            return MyPlugin.convertOption2(value);
            break;
        // And so on
    }
}

Is this a convention to add a break statement to any case statement, so that fallthroughs are really avoided?
I ask, because in this case they are completely unnecessary, as the return statement will already break the control follow of the whole function and not just the switch statement by returning to the calling function.
I think it's just force of habit, really. Convention is that every case end with a break to avoid fallthrough, so people still do it even if the case has a return in it.
The fall through language design feature is well known for causing errors.
There is a reason why modern languages try to guard against it.

In Swift you must explicitly state your fallthrough: https://docs.swift.org/swift-book/LanguageGuide/ControlFlow.html#ID130
Kotlin went a step further and did not feature a fallthrough method: https://kotlinlang.org/docs/reference/control-flow.html#when-expression

As for Javascript.
Yes, always add break statements (or return statements I guess) to all your case statements. You can then remove the break statements where you want the fallthrough. This is simply a safer way of coding.

Edit: In a show of my reading skills I didn't pay attention to there being dead code. It's just a mistake, it happens. If it was caught the break statement would be removed as return breaks the flow just as well.

*hugs*
As you noted, the break statement in your example will never get called. its a useless addition.
1598619603654.png


Notice that my syntax highlighting has shaded/opaqued the break statements. When you hover over them it tells you 'unreachable code detected'.

Original thread: https://forums.rpgmakerweb.com/threads/why-do-so-many-people-add-a-break-after-return-in-switch-statements.126298/