New slides about Go

Nick Sabalausky a at a.a
Fri Oct 15 14:25:55 PDT 2010


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:i97utq$d7e$1 at digitalmars.com...
> Found through Reddit, talk slides by Rob Pike, "The Expressiveness of Go":
> http://go.googlecode.com/hg/doc/ExpressivenessOfGo.pdf
>
> http://www.reddit.com/r/programming/comments/dr6r4/talk_by_rob_pike_the_expressiveness_of_go_pdf/
>
> This time I think I have understood most of the contents of the slides :-)
>
>
> Few interesting quotations:
>
> From Page 18:
>
> There are pointers but no pointer arithmetic
>  - pointers are important to performance, pointer arithmetic not.
>  - although it's OK to point inside a struct.
>    - important to control layout of memory, avoid allocation
> Increment/decrement (p++) are statements, not expressions.
>  - no confusion about order of evaluation
> Addresses last as long as they are needed.
>  - take the address of a local variable, the implementation
>    guarantees the memory survives while it's referenced.
> No implicit numerical conversions (float to int, etc.).
>  - C's "usual arithmetic conversions" are a minefield.
>
>
> From page 19 and 20:
>
> Constants are "ideal numbers": no size or sign, hence no L
> or U or UL endings.
>
> Arithmetic with constants is high precision.  Only when
> assigned to a variable are they rounded or truncated to fit.
>
> A typed element in the expression sets the true type of the constant.
>
>
> From page 40:
>
> Goroutines have "segmented stacks":
>   go f()
> starts f() executing concurrently on a new (small) stack.
> Stack grows and shrinks as needed.
> No programmer concern about stack size.
> No possibility for stack overflow.
> A couple of instructions of overhead on each function call, a
> huge improvement in simplicity and expressiveness.
>
>
> From page 46:
>
> The surprises you discover will be pleasant ones.
>

I just hope they get serious enough about functional programming to gain 
some monads to go along with their "goroutines".




More information about the Digitalmars-d mailing list