wenyan icon indicating copy to clipboard operation
wenyan copied to clipboard

语感建议:若其者 --> 若其阳者

Open lymslive opened this issue 5 years ago • 3 comments

在读 stdlib 一些代码,感觉 “若其者”读之太不顺,建议 “若其阳者”表示 if(most_recent_var) 若其阴者”表示 if(!most_recent_var)

lymslive avatar Jan 10 '20 09:01 lymslive

You're right! 若其阳者 reads more smoothly. I'll definitely consider adding this.

Notice that 若其等於陽者 若其等於陰者 is already supported and does (almost) exactly the same thing. 若其者 is just a shorthand and is arguably a stylistic choice. Only difference is if(!a) and if(a) do a typecast from any type to bool, which, now that wenyan-lang is stricter on types, we need to consider how we want to handle this.

Thanks for bringing this up!

EDIT: another possibility is to use 若其然者 若其不然者. This way we don't change the semantic meaning of and to accommodate one new syntax, and the expressions will be arguably more common in classical Chinese.

LingDong- avatar Jan 10 '20 13:01 LingDong-

I like 若其然者 若其不然者

cuixiping avatar Jan 11 '20 06:01 cuixiping

若其是者,若其非者?

hustcer avatar Jan 19 '20 03:01 hustcer