Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Of course you can force-inline.


Obviously you can manually inline functions. That's what happened in the article.

The comment is about having a directive or annotation to make the compiler inline the function for you, which Go does not have. IMO, the pre-inline code was cleaner to me. It's a shame that the compiler could not optimize it.

There was once a proposal for this, but it's really against Go's design as a language.

https://github.com/golang/go/issues/21536


You can in any systems programming language.

Go is mostly a toy language for cloud people.


> toy language

You may be surprised to hear that Go is used in a ton of large scale critical systems.


I don't consider cloud technology a critical system.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: