gtroza Δημοσ. 11 Νοεμβρίου 2009 Δημοσ. 11 Νοεμβρίου 2009 Go: A New Programming Language from Google http://www.ddj.com/linux-open-source/221601205?cid=RSSfeed_DDJ_OpenSource Google has launched Go, a new systems programming language born with concurrency, simplicity, and performance in mind. Go is open source and its syntax is similar to C, C++ and Python. It uses an expressive language with pointer but no pointer arithmetic. It is type safe and memory safe. However, one of its main goals is to offer the speed and safety of a static language but with the advantages offered by modern dynamic languages. Go also offers methods for any type, closures and run-time reflection. The syntax is pretty clean and it is garbage collected. It is intended to compete with C and C++ as a systems programming language. γιά ρίξτε μιά ματιά οι ειδικοί ! http://golang.org/doc/go_tutorial.html Hello, World[Top] Let's start in the usual way: 05 package main 07 import fmt "fmt" // Package implementing formatted I/O. 09 func main() { 10 fmt.Printf("Hello, world; or Καλημέρα κόσμε; or こんにちは 世界\n"); 11 } Every Go source file declares, using a package statement, which package it's part of. It may also import other packages to use their facilities. This program imports the package fmt to gain access to our old, now capitalized and package-qualified, friend, fmt.Printf. Functions are introduced with the func keyword. The main package's main function is where the program starts running (after any initialization). String constants can contain Unicode characters, encoded in UTF-8. (In fact, Go source files are defined to be encoded in UTF-8.) The comment convention is the same as in C++: /* ... */ // ... Later we'll have much more to say about printing. .
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.