Elye - A One Eye Dev By His Grace
1 min readAug 21, 2020

--

Unforunately yes, there's such rules of code need or need not have Semicolon.

I know most languages either a must or totally not required. But there are some languages that support both. E.g. Kotlin, Swfit, JavaScript etc.

Kotlin and Swift user which are a more modern stlye language, people prefer not to have semicolons, and in Kotlin having it produce the IDE warning of it as redundant.

However in JavaScript, this is a heavily debated topic. https://www.joezimjs.com/javascript/the-great-semicolon-debate/ and https://medium.com/@goatslacker/no-you-dont-need-semicolons-148d936b9cf2

To me, it is not needed if the compiler understand it's the end of your code statement. Don't use Semicolon just for ceremony purposes.

--

--

Elye - A One Eye Dev By His Grace
Elye - A One Eye Dev By His Grace

Written by Elye - A One Eye Dev By His Grace

Sharing Software Learning, Life and Faith Journey

Responses (1)