Semicolons: mostly unnecessary?

Yigal Chripun yigal100 at gmail.com
Fri Oct 23 16:54:07 PDT 2009


On 23/10/2009 19:41, bearophile wrote:
> Yigal Chripun:
>
>> The trade-off here is obvious: if you use line continuations like
>> in python they would be very rare but would not be automatic and
>> consistent when you do need to use them.
>
> In my Python code (or in good code you may find around, like in some
> modules of the std library) you may have a hard time finding few line
> continuations. Generally you can avoid them putting code in
> parentheses. And if/when you want to use them it's simple. So I think
> you are wrong.
>
> Bye, bearophile

Nothing you said contradicts what I said.
The fact that they are rare in python means that you need to think if 
and when you need to use them whereas in c/c++/d/etc you use semicolons 
consistently throughout the code so adding them is an automatic action 
that requires no thought.
here's an analogy:
there's a speed limit set by law inside cities so any driver with little 
experience will automatically slow down when entering a city. that speed 
limit becomes an automatic habit you don't need to think about.
however when you see a sign with a different speed limit you do need to 
process that info in the brain and conscientiously change your speed.



More information about the Digitalmars-d mailing list