BTW, I've just released Genesis, an open source generic preprocessor which automatically converts Allman style code into K&R and allows genericity by parametric instantiation.
https://github.com/senselogic/GENESIS Better late than never... ;) On Saturday, September 21, 2013 at 3:58:03 AM UTC+2, Michael Daconta wrote: > > Hi Go fans, > > I frankly was shocked to learn that a program like: > > package main; > > import "fmt"; > > func main() > { > fmt.Printf("hello, world!\n"); > } > > ... is currently illegal in go with the error: > > # command-line-arguments > .\hello.go:6: syntax error: unexpected semicolon or newline before { > > From reading the newsgroups, I see that this is illegal due to the > automatic insertion of semi-colons; however, what if I added my own > semi-colons into the code as in the above. From a language perspective the > above should be legal Go code. To me, it seems like a hack for convenience > (making semi-colons optional) has forced a K&R style on everyone. > For me, this is a show-stopper. Frankly, I am surprised that Google would > enforce a coding style (K&R) while saying that "go fmt" frees you from > worrying about divergent coding styles. Sorry, google - you cannot have it > both ways. Unless the Allman-style code above is illegal in the language > (which makes no sense from a language semantics point of view) - get the > compiler to accept it. Period. > > Yes, I know I can write my own translator - but why? Heck, I can just > stick with Java... > > C'mon Google, when trying to pitch a new language, you can (and should) do > better than this... > > - Mike > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.