It was commented that profiling tools are very good, which helped bring speed increases: Except for OSX, at least the last time I tried. Is there a chance that this will be fixed anytime soon?
What would you take out?Ampersand a struct: This feels so natural to me. What else would you do?The number of ways to declare a variable is too high: What would you take out? I can see that new and struct literals are highly overlapping.Colon equals for overwrite: Totally agreed. I avoid overwriting variable names. However, could someone point me to a use case where it's well done? I'd be interested in seeing the positive use cases.Named result parameters: Please keep these in. They are really useful in remembering the order of outputs when you're returning several things. func([]input) (float64, float64) is less clear than func([]input) (sum float64, prod float64)Variable reused in a for loop being confusing, especially for closures: I'm not sure what this means. Could you give an example of a proper and improper closure with it?
Facilitating concurrency across network: I agree, though I personally would like to see a focus on cluster / supercomputer stuff (I realize that I'm in the minority with that), though I imagine there is significant overlap between the two . It would be awesome if it could be nearly as easy as shared memory. Go circuit kind of looks like it, though I haven't had a chance to really play with it to see if that's true.Lots of speedups from developments to the runtime and scheduler, and a lot more to come: What kinds of things should we expect to see? Any idea on how much more performance that will bring? Another blanket 40%? Just improvements for multi-core? As I begin to
push Go, one of the questions I will get is about the computation speed, and in my world, that's mostly number crunching. Will I have to say "It's not quite as fast as C/C++, but it's way better for safety, compile time, ease of coding, GC, etc.", or will I be able to say "It's as fast as C++ and it's way better, etc."
Source transformation tools: There are some specific packages that involve re-writting source code would be very useful, and were such tools to exist well in Go it would make selling the language easier for me. If I wanted to learn how to write these packages, is reading the go fmt source the best way to learn how to do source transformation, or are there better ways?
Writing the go compiler/runtime in go: A good reason is that all of us here write Go. If the compiler and runtime are written in Go it becomes a lot easier for the community to read and understand what's going on. It would also make it easier for the community to submit patches and improvements (not sure how much that would actually happen).
Our go compiler is better than the C compiler: Did that mean that there is a go compiler written in Go that the team has, or just that compiling Go code is better than compiling C code?
Variable reused in a for loop being confusing, especially for closures: I'm not sure what this means. Could you give an example of a proper and improper closure with it?compare these two for loops:// improper use of variable i [http://play.golang.org/p/1D91sWLsSV]for i := 1; i < 10; i++ {defer func() { println(i) }()}// corrected [http://play.golang.org/p/_w1TNbYtUF]for i := 1; i < 10; i++ {defer func(i int) { println(i) }(i)}
If any of you haven't seen, the fireside chat is up https://www.youtube.com/watch?v=p9VUCp98ay4 . Here are some thoughts I had while watching itIt was commented that profiling tools are very good, which helped bring speed increases: Except for OSX, at least the last time I tried. Is there a chance that this will be fixed anytime soon?
Dependency management: I know this issue has been making the rounds for a while, and I agree with the Go team that people should be aware what they're doing when they use go get. That said, I know what I'm getting into when I download "some random person's github", but I'm not sure what the best practices are with it. A lot of the code I write is for my own uses, as opposed to for production, but at the same time, sometimes I do like to give code to collaborators. Not having a version control specification has positives, one of which is that it makes it easy to gain features and performance from the github package as it is worked on. On the other hand, if the github writer isn't as particular about backward compatibility as I thought, the github code might change in a backward incompatible way. If I'm not continually updating my local copy, I might not realize this change. I am hoping to get advice on best practices in dealing with these issues.What would you take out?Ampersand a struct: This feels so natural to me. What else would you do?The number of ways to declare a variable is too high: What would you take out? I can see that new and struct literals are highly overlapping.Colon equals for overwrite: Totally agreed. I avoid overwriting variable names. However, could someone point me to a use case where it's well done? I'd be interested in seeing the positive use cases.Named result parameters: Please keep these in. They are really useful in remembering the order of outputs when you're returning several things. func([]input) (float64, float64) is less clear than func([]input) (sum float64, prod float64)Variable reused in a for loop being confusing, especially for closures: I'm not sure what this means. Could you give an example of a proper and improper closure with it?Facilitating concurrency across network: I agree, though I personally would like to see a focus on cluster / supercomputer stuff (I realize that I'm in the minority with that), though I imagine there is significant overlap between the two . It would be awesome if it could be nearly as easy as shared memory. Go circuit kind of looks like it, though I haven't had a chance to really play with it to see if that's true.Lots of speedups from developments to the runtime and scheduler, and a lot more to come: What kinds of things should we expect to see? Any idea on how much more performance that will bring? Another blanket 40%? Just improvements for multi-core? As I begin to push Go, one of the questions I will get is about the computation speed, and in my world, that's mostly number crunching. Will I have to say "It's not quite as fast as C/C++, but it's way better for safety, compile time, ease of coding, GC, etc.", or will I be able to say "It's as fast as C++ and it's way better, etc."Source transformation tools: There are some specific packages that involve re-writting source code would be very useful, and were such tools to exist well in Go it would make selling the language easier for me. If I wanted to learn how to write these packages, is reading the go fmt source the best way to learn how to do source transformation, or are there better ways?
Writing the go compiler/runtime in go: A good reason is that all of us here write Go. If the compiler and runtime are written in Go it becomes a lot easier for the community to read and understand what's going on. It would also make it easier for the community to submit patches and improvements (not sure how much that would actually happen).Our go compiler is better than the C compiler: Did that mean that there is a go compiler written in Go that the team has, or just that compiling Go code is better than compiling C code?Thanks for the discussion time.
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Source transformation tools: There are some specific packages that involve re-writting source code would be very useful, and were such tools to exist well in Go it would make selling the language easier for me. If I wanted to learn how to write these packages, is reading the go fmt source the best way to learn how to do source transformation, or are there better ways?I wrote a source-to-source compiler framework for Go as part of my automatic parallelizing compiler research (https://github.com/wetherbeei/gopar), but it isn't separated into it's own package yet. Would there be interest in that?
On Sun, May 19, 2013 at 9:57 AM, Brendan Tracey
<tracey....@gmail.com> wrote:
>
> What would you take out?
> Ampersand a struct: This feels so natural to me. What else would you do?
Let me start by saying that of course the language is not going to change.
&S{} is like nothing else in the language. It's a special case in the
syntax. Another approach would be to extend the composite literal
syntax to support pointers: (*S){}. That is consistent with other
composite literals: you state the type you want, and then you state
the value.
> The number of ways to declare a variable is too high: What would you take
> out? I can see that new and struct literals are highly overlapping.
I'm not sure what this one was about.
> Colon equals for overwrite: Totally agreed. I avoid overwriting variable
> names. However, could someone point me to a use case where it's well done?
> I'd be interested in seeing the positive use cases.
a, err := F()
if err != nil {
return
}
b, err := G() // A new err would mean two variables with the same name
in the same block. Confusing.
// So we get a new b and the same err.
> Named result parameters: Please keep these in. They are really useful in
> remembering the order of outputs when you're returning several things.
> func([]input) (float64, float64) is less clear than func([]input) (sum
> float64, prod float64)
The language is not going to change. And every feature is useful;
otherwise it would not have been added. The question is not whether a
feature has a use. It is whether it's worth it.
> Lots of speedups from developments to the runtime and scheduler, and a lot
> more to come: What kinds of things should we expect to see? Any idea on how
> much more performance that will bring? Another blanket 40%? Just
> improvements for multi-core? As I begin to push Go, one of the questions I
> will get is about the computation speed, and in my world, that's mostly
> number crunching. Will I have to say "It's not quite as fast as C/C++, but
> it's way better for safety, compile time, ease of coding, GC, etc.", or will
> I be able to say "It's as fast as C++ and it's way better, etc."
For pure number crunching, if you can use gccgo, you should get
results comparable to C++. I think you can do slightly better in C++
with careful use of the restrict qualifier on pointers; there is no
way to state the corresponding restriction in Go using slices, and the
issue will arise when passing a slice to a function to hold the
results.
I'm pretty sure named result parameters were mentoined only as an example of often problematic situation with the colon equals operator. I'm sure colon equals would be removed instead of named result parameters if they removed something.
I agree it's good and most of the time makes life easier but I think many of the problems with it should have never been there. I'm pretty sure we would come up with an alternative way to do the same or just different rules without causing all the confusion.Just to make it clear I didn't mean it should be removed but IMO any sane person would change the colon equals operator to fit a little better rather than removing the named result parameters.
computed at the start with a branch to the right place, general or fancy. You have to do the first part of this anyway for memory verification, and the second is just a constant compared with the value in the passed in pointer."len(a) >= len(b) && addr(a) + minWidth*sizeof(float64) > addr(b)"
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.