Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option型 #45

Open
marihachi opened this issue Feb 4, 2023 · 0 comments
Open

Option型 #45

marihachi opened this issue Feb 4, 2023 · 0 comments
Labels

Comments

@marihachi
Copy link
Member

marihachi commented Feb 4, 2023

構文案

var x: Option<number> = null;

// cast interfaces
var player: Char = Char { };
var y: Option<Drawable & Position> = player;
y = null;

nullリテラルとOption<T>型の追加。
Optionを明示しない限りはnull値を許容しない。
Option<T>とするのでGeneric型(インターフェース)もサポートする方が自然?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant