goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

Naming return values (?) #558

Open st0012 opened 6 years ago

st0012 commented 6 years ago

According to this article, we can get smaller and more efficient binary code generated if we name function's return values.

So I think it'll be great for Goby if we can all do this in the future and refactoring the existing code. @hachi8833 @saveriomiroddi

64kramsystem commented 6 years ago

There is a very interesting discussion in the related Golang GitHub issue.

st0012 commented 6 years ago

Yep, I've read them. Actually, except the compilation optimization we can get, I also think it'll help us on code's readability. I think at this point our codebase is lack of documentation, naming return values should help that. And I know there's a potential risk about shadowing variables, but I think it can be avoid if we use proper IDE or editors.