Updated specification #8

Merged
pca006132 merged 5 commits from updated into master 2021-06-07 10:06:52 +08:00
1 changed files with 8 additions and 0 deletions
Showing only changes of commit 30dd6a1ac1 - Show all commits

View File

@ -88,6 +88,14 @@ Only types supported in the kernel can be referenced.
does not fit into int32, it would raise an error. (Issue #2) does not fit into int32, it would raise an error. (Issue #2)
* Only `uint32`, `int32` (and range of them) can be used as index. * Only `uint32`, `int32` (and range of them) can be used as index.
### Kernel Only class
* Annotate the class with `@kernel`.
* Functions are all kernel only, including constructor.
Questions:
* Should we also do `@portable`?
* Support inheritance and polymorphism?
## Generics ## Generics
We use [type variable](https://docs.python.org/3/library/typing.html#typing.TypeVar) for denoting generics. We use [type variable](https://docs.python.org/3/library/typing.html#typing.TypeVar) for denoting generics.