4 ms·
> every program past Hello World will actually use all these features. Not on embedded.
by kevin_thibedeau 5y ago
> every program past Hello World will actually use all these features.
Not on embedded.
- cweagans 5y agoThis is a bad argument for the same reason that "my yacht can't be used for cross country road trips" is a bad argument. You're 100% not going to use the normal Go compiler for embedded development. It's not a use-case that was considered nor engineered for. TinyGo supports it, but they built a new compiler to support that use-case.
- krona 5y agoNot paying for what you don't use is not an unreasonable goal of a compiler, linker etc.
- JulianMorrison 5y agoIt is an unreasonable goal if (1) it's wildly outside the expected use cases and (2) it complicates things. Both of which would apply.
- cweagans 5y agoSure. But as stated previously, even a basic hello world go program does use the runtime.
- adgjlsfhk1 5y agoPretty much all programs use the GC. Threading isn't used in everything, but Go, especially probably has at least 50% of programs over 1000 lines use threads (especially considering the standard lib).
- JulianMorrison 5y agoIf I remember right the GC lives on a thread, even if the program runs serially.
- jrockway 5y agoI use tinygo on microcontrollers and use channels. It's simpler than an RTOS.
- dgellow 5y agoLink for those interested: https://tinygo.org/ https://tinygo.org/. > TinyGo brings the Go programming language to embedded systems and to the modern web by creating a new compiler based on LLVM. > You can compile and run TinyGo programs on over 60 different microcontroller boards such as the BBC micro:bit and the Arduino Uno. > TinyGo can also produce WebAssembly (WASM) code which is very compact in size. You can compile programs for web browsers, as well as for server and edge computing environments that support the WebAssembly System Interface (WASI) family of interfaces.