ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Воскресенье
5 мая
172161
Evgeny_CD, Архитектор (11.11.2009 23:35, просмотров: 10810)
Ну что, мы готовы кодить на Go? "Google представил свой язык программирования" -> сайт языка --> http://golang.org/doc/effective_go.html
http://www.cnews.ru/news/top/index.shtml?2009/11/11/369303
http://golang.org/doc/go_faq.html "What compiler technology is used to build the compilers? Gccgo has a C++ front-end with a recursive descent parser coupled to the standard GCC back end. Gc is written in C using yacc/bison for the parser. Although it's a new program, it fits in the Plan 9 C compiler suite (http://plan9.bell- …/sys/doc/compiler.html) and uses a variant of the Plan 9 loader to generate ELF binaries. We considered writing 6g, the original Go compiler, in Go itself but elected not to do so because of the difficulties of bootstrapping and especially of open source distribution—you'd need a Go compiler to set up a Go environment. Gccgo, which came later, makes it possible to consider writing a compiler in Go, which might well happen. (Go would be a fine language in which to implement a compiler; a native lexer and parser are already available in /pkg/go.) We also considered using LLVM for 6g but we felt it was too large and slow to meet our performance goals. " Через Ж автогеном.. "Смешать, но не взбалтывать"... Из нетривиального - Multiple return values *** Goroutines - вот это сильно! They're called goroutines because the existing terms—threads, coroutines, processes, and so on—convey inaccurate connotations. A goroutine has a simple model: it is a function executing in parallel with other goroutines in the same address space. It is lightweight, costing little more than the allocation of stack space. And the stacks start small, so they are cheap, and grow by allocating (and freeing) heap storage as required. Goroutines are multiplexed onto multiple OS threads so if one should block, such as while waiting for I/O, others continue to run. Their design hides many of the complexities of thread creation and management. Prefix a function or method call with the go keyword to run the call in a new goroutine. When the call completes, the goroutine exits, silently. (The effect is similar to the Unix shell's & notation for running a command in the background.) -- Бред какой-то написан. Если для криЭйторов ГОпнического языка threads, coroutines, processes примерно одна и та же шняга - как-то стремно такой язык юзать...