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

太啰嗦,没有体现文言之精髓 #48

Open
hainee opened this issue Dec 18, 2019 · 9 comments
Open

太啰嗦,没有体现文言之精髓 #48

hainee opened this issue Dec 18, 2019 · 9 comments
Labels
non-dev chatter Discussion not related to development

Comments

@hainee
Copy link

hainee commented Dec 18, 2019

No description provided.

@LingDong-
Copy link
Member

Good criticism. Sometimes it is difficult to have both the beauty of classical Chinese and unambiguousness required for a programming language. If you have any suggestions to the syntax, please feel free to bring them up!

Thanks.

@yanlinlin82
Copy link

我感觉这项目会逐步演化到既“体现文言简练精髓”又灵活易用的地步。加油!

@bd233
Copy link

bd233 commented Dec 18, 2019

嗯,我也深表赞同,不过文言的言简意赅是相对现代汉语来说的,没有语言能比编程语言更精简了,同时,像作者说的,太精简就无法兼顾到语法和语韵美,这之间的平衡不太好掌握。

@bd233
Copy link

bd233 commented Dec 18, 2019

Good criticism. Sometimes it is difficult to have both the beauty of classical Chinese and unambiguousness required for a programming language. If you have any suggestions to the syntax, please feel free to bring them up!

Thanks.

I have a simple example,like this:
有數曰三 名「甲」。
遍「甲」。
言「「問天地好在。」」。
云云。

@LingDong-
Copy link
Member

LingDong- commented Dec 18, 2019

@bd233 Thanks for the suggestion!

  • 名 as a shorthand to 名之曰 is nice. But consider this example:
吾有三数。名之曰「甲」。曰「乙」。曰「丙」。

Once we remove 之曰, the sentence no longer make much sense, nor does it retain the parallelism. Two possible solutions would be:

  • Allow the shorthand only for naming a single variable
  • Change the second and third 曰 to 名 too.

And either of them inevitably adds some complexity to the language. Again, we need to seek a balance. Let's think about this more.

  • for the character 遍 followed by a number, I haven't seen this grammar in classical Chinese texts (forgive my lack of knowledge), perhaps you could provide an example?

  • I agree that the print syntax could be simplified. But is already used as type name for strings. If we case on it in our code we might eventually find that this does not create ambiguity after all. But before that let's try thinking of another keyword :-P EDIT: Perhaps simply 書「「問天地好在」」, since 書之 is already used for printing strings, this new syntax will be quite natural.

Thanks again for your suggestions.

@zhan8863
Copy link

you can you up

@E-C-Ares
Copy link

E-C-Ares commented Dec 23, 2019

有數五十。名之曰「大衍」。
可否新增"令"句式, 上句可为:
令「大衍」數五十.
然十进制位显冗余, 逐之为:
令「大衍」數五〇.
望还增指数计数法, 便后人用

另: 漢字既有简繁, 何不: ”保留字“書于繁, ”变量名“書于简 ?
令 大衍 數 伍亻.

@LingDong- LingDong- added the non-dev chatter Discussion not related to development label Dec 24, 2019
@xubaiw
Copy link

xubaiw commented Dec 25, 2019

然输入法切换之不易

@lumingxijian
Copy link

然输入法切换之不易

可試此法
吾有一數。曰「五千萬」。
五千萬亦作
吾有一數。曰「五又七位」

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-dev chatter Discussion not related to development
Projects
None yet
Development

No branches or pull requests

8 participants