One document about Go
Walter Bright
newshound1 at digitalmars.com
Tue Jun 1 12:15:53 PDT 2010
Lurker wrote:
> == Quote from bearophile (bearophileHUGS at lycos.com)'s article
>
>> In Go you can omit semicolons at the end of lines, so I presume it's not a
> terrible thing for C-like languages:
>> package main
>> import " fmt " // formatted I/O.
>> func main() {
>> fmt.Printf ("Hello Hello\n")
>> }
>
> When will D support that? Removing unnecessary semis really pretties up the
> code.
This idea reappears every few years, and even gets folded into a language now
and then. It started with Pascal, and most recently has appeared in Javascript.
The idea basically sux because of the maintenance issue. What maintenance issue?
The one where you decide to add a new line of code before the }. You inevitably
forget to go back and append the ; to the previous line. Even if you do happen
to remember, now your diff visualizer shows 2 lines changed rather than 1.
C got it right and it doesn't need fixing.
(There are other good reasons for the ; I outlined in my blog
http://www.drdobbs.com/blog/archives/2010/05/improving_compi.html )
More information about the Digitalmars-d
mailing list