Its idiosyncrasies follow.
- Backward declaration: Instead of declaring a variable like "int a", you do "var a int".
- Type derivation with ":=". You can initialize variables and Go will derive its type for you. For example doing "a := 1.0" automatically initalizes "a" to a "float".
- Semicolons are not required at the end of each statement.
- The only looping construct available is the "for" statement. No "while" or "do-while".
- The parameters for the "for" and "if" statements don't need to be within parentheses (I'm shocked and crying)
- Unicode strings which are immutable.
- Pointers but no pointer arithmetic.
- Its compiler is currently not available for Windows -- only for Linux and Mac. Doubt if a cygwin port is available.
2 comments:
Nice read..interesting excerpts - "By January 2008, Ken had started work on a compiler with which to explore ideas; it generated C code as its output. By mid-year the language had become a full-time project and had settled enough to attempt a production compiler."
Damn a production compiler in 6 months..that's some really fast development!!
Read carefully dude. It says "settled enough to attempt a production compiler"
Post a Comment