in ,

Fuchsia Programming Language Policy, Hacker News

Scope

This document describes which programming languages ​​the Fuchsia project uses and supports for production software on the target device, both within the Fuchsia Platform Source Tree and for end-developers building for Fuchsia outside the Fuchsia Source Platform Tree. The policy does not apply to (a) developer tooling, either on target or host devices, or (b) software on the target device that is not executed in normal, end-user operation of the device. For example, this policy does not apply to zxdb (a debugger) because zxdb is a developer tool; the policy does apply to pkgfs because pkgfs (a file system) executes in the normal, end-user operation of the device.

Definitions

The Fuchsia Platform Source Tree is the source code hosted on fuchsia.googlesource.com. The Fuchsia Platform Source Tree can absorb larger changes to the Fuchsia system and its underlying technologies than end-developers because changes that impact only the Fuchsia Platform Source Tree can be executed without coordination with other groups of people.

End-developers are people who write software for Fuchsia outside of the Fuchsia Platform Source Tree. Changes that impact end-developers require more coordination and take longer to execute than changes that impact only the Fuchsia Platform Source Tree.

Supported for end-developers means that the Fuchsia SDK contains tools and libraries that help people use the language to develop software for Fuchsia, including a language-specific backend (and supporting libraries) for FIDL. Support also implies some level of documentation, including tutorials and examples, as well as investment from developer relations.

Strong support for asynchronous programming means asynchronous programs can be written using straight-line code (eg, using async / await in languages like Rust and Dart).

Languages C . Analysis Pro: C is a widely used language. The language has properties that are well-understood, have been stable over a long period of time, and have been used to build similar systems in the past. The language has a mature toolchain and associated developer tools.

Pro: C has a stable ABI, which lets the Fuchsia SDK contain prebuilt binaries that end-developers can re-use. Pro: Many languages ​​can interoperate with C using a foreign function interface. Supporting C makes it easier for end-developers to integrate these languages ​​with Fuchsia. : Pro: Our current end-developers already use the language. (Con Con: Support for asynchronous programming is weak . Con: Programs written in the language often have security bugs arising from the language’s lack of memory safety. Con: Programs written in the language often contain resource leaks because the language does not provide a facility for automatically releasing resources. Con: Type safety is weak compared to C . Simply recompiling some of our C code as C often results in compiler errors that surface latent bugs in the code.

  • Decision (C is supported for end-developers. (See the list of supported versions of C .)

  • Within the Fuchsia Platform Source Tree, new uses of C are discouraged. Ask the relevant OWNERS for guidance about whether to use C for new code.
  • (C is approved for use in the Fuchsia Platform Source Tree: for low-level systems programming, including within the kernel , and
  • , and for defining ABI-stable interfaces to shared libraries and other system components.

    C Analysis Pro: Many of our current end-developers use C e xtensively. Pro: The Fuchsia Platform Source Tree uses C extensively.

  • Pro: C is a widely used language. The language has properties that are well-understood, have been stable over a long period of time, and have been used to build similar systems in the past. The language has a mature toolchain and associated developer tools.

    Con: Support for asynchronous programming is weak.

  • Decision C is supported for end-developers. (See the list of supported versions of C .)

  • C is approved for use throughout the Fuchsia Platform Source Tree.
  • Dart Analysis : Pro: Our current end-developers already use the language. Pro: The majority of Fuchsia’s user interface is built using Flutter, which uses Dart. Pro: Asynchronous programs can be written using straight-line code. Pro: People using the language are highly productive.
  • Pro: The Fuchsia project has the opportunity to influence the evolution of the language.
  • Analysis Pro: The Fuchsia Platform Source Tree has had positive implementation experience using Rust.

      Pro: The language provides memory safety guarantees, which reduces the risk of software developed in the language having security bugs. Pro: Asynchronous programs can be written using straight-line code.

    : Pro: The Fuchsia project has the opportunity to influence the evolution of the language.

    Analysis : Pro: Go is a widely used language within Google.

    Decision Go is not approved, with the following exceptions: netstack . Migrating netstack to another language would require a significant investment. In the fullness of time, we should migrate netstack to an approved language.

  • All other uses of Go in Fuchsia for production software on the target device must be migrated to an approved language. (Read More) Payeer
  • What do you think?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    GIPHY App Key not set. Please check settings

    Meghan Markle and Prince Harry's supporters 'finding disrespect to Queen really difficult' – Express, Express.co.uk

    Meghan Markle and Prince Harry's supporters 'finding disrespect to Queen really difficult' – Express, Express.co.uk

    CareRev (YC S16) Is Hiring a Senior Back End Engineer in Los Angeles, Hacker News