Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Friday September 06 2019, @05:06PM   Printer-friendly
from the its-a-start dept.

Arthur T Knackerbracket has found the following story:

Go — a modern programming language with roots at Google — is one of the new generation languages that would like to unseat C (and C++) for what we think of as traditional programming. It is only for PCs, though, right? Not so fast! TinyGo provides a compiler that — in their words — is for small places. How small? They can target code for the Arduino Uno or the BBC micro:bit. It can also produce code for x86 or ARM Linux (both 32- and 64-bit) as well as WebAssembly. They claim that a recent project to add ESP8266 and EPS32 support to LLVM will eventually enable TinyGo to target those platforms, too.

As you would expect, there are some subtle differences between TinyGo and the full-blown version. The compiler handles the entire program at once which is slower but offers more for optimization. Certain optimizations for interface methods are not used in TinyGo, and global variable handling changes to accommodate moving data from flash to RAM efficiently. TinyGo passes parameters in registers.

Other changes are more profound. For example, there’s no garbage collection yet, so you are urged to not perform heap allocations after initialization. There are also a few other major features not supported. Concurrency in the form of goroutines and channels, cgo, reflection, and three index slices won’t work. Maps are available, but only with certain key types. Because of the missing pieces, many of the packages in the standard library won’t build.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Saturday September 07 2019, @12:18AM

    by Anonymous Coward on Saturday September 07 2019, @12:18AM (#890777)

    "small" "embedded" systems today are bigger than mainframe cpus were in the early 1970's.

    The fact that you bring up x86/ARM/POWER CPUs in reference to **small embedded systems** just reinforces that you are totally ignorant about the field. You just don't know what it is.

    There some small variants:

    x86: https://en.wikipedia.org/wiki/Vortex86 [wikipedia.org]

    ARM: https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M3 [wikipedia.org]

    POWER: https://en.wikipedia.org/wiki/RAD750 [wikipedia.org]

    Are you talking about 8bit like PIC and z80s here? Cause MicroPython targets some of those too so TinyGo and uLisp can do as much too. I mean, why not?