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

ADT成员参数列表参数名字支持的问题 #31

Open
chinesebear opened this issue Sep 18, 2022 · 0 comments
Open

ADT成员参数列表参数名字支持的问题 #31

chinesebear opened this issue Sep 18, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@chinesebear
Copy link
Contributor

a2335ff21cd7643507a7fb6c1dd5b53
这个名字有助于解释参数意义,应该要加上吧。

主要,因为ADT有分支,所以不能像结构体一样用名字取出值
有一种方案是,允许ADT的分支定义一个私有结构体,这是OCaml的一个功能

image

@chinesebear chinesebear added the bug Something isn't working label Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants