google / google/emboss

No way to add integral type safety on top of the currently available type system

Open
#25 5 comments 1 reaction 0 assignees View on GitHub
enhancement language feature
Dominant language
Python
Stars
92
Forks
30
PR merge metrics
No merged PRs in 30d

Description

Emboss provides no way to add integral type safety on top of the currently available type system. For example, suppose we wanted to store both an advertising handle and a connection handle within an Emboss definition. Both of these types are two bytes wide; we can use a `UInt:16` to store them. However, this would mean that we can assign the values across the two ‘types’ as well. It would be better if we could tell Emboss to create a new pseudotype specific for an advertising handle and specific for a connection handle. Although they are still backed by a `UInt:16`, the Emboss compiler would be able to check types match across arguments both in `.emb` files as well as in generated code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.