wenyan icon indicating copy to clipboard operation
wenyan copied to clipboard

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

Open hainee opened this issue 5 years ago • 9 comments

hainee avatar Dec 18 '19 03:12 hainee

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.

LingDong- avatar Dec 18 '19 03:12 LingDong-

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

yanlinlin82 avatar Dec 18 '19 03:12 yanlinlin82

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

bd233 avatar Dec 18 '19 03:12 bd233

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: 有數曰三 名「甲」。 遍「甲」。 言「「問天地好在。」」。 云云。

bd233 avatar Dec 18 '19 03:12 bd233

@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.

LingDong- avatar Dec 18 '19 04:12 LingDong-

you can you up

zhan8863 avatar Dec 18 '19 06:12 zhan8863

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

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

E-C-Ares avatar Dec 23 '19 14:12 E-C-Ares

然输入法切换之不易

xubaiw avatar Dec 25 '19 04:12 xubaiw

然输入法切换之不易

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

lumingxijian avatar Feb 09 '23 08:02 lumingxijian