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

Auto generate examples README.md by nodejs. #448

Merged
merged 1 commit into from
Dec 31, 2019
Merged

Auto generate examples README.md by nodejs. #448

merged 1 commit into from
Dec 31, 2019

Conversation

cuixiping
Copy link
Contributor

Auto generate examples README.md by nodejs.
And make examples README.md pretier.
And add some latest examples to list.

@antfu
Copy link
Member

antfu commented Dec 31, 2019

I am wondering why don't we consider just rename the examples to Chinese characters especially we are already using them in stdlib?

@cuixiping
Copy link
Contributor Author

I am wondering why don't we consider just rename the examples to Chinese characters especially we are already using them in stdlib?

I agree.

@LingDong- LingDong- merged commit bd05c91 into wenyan-lang:master Dec 31, 2019
@LingDong-
Copy link
Member

Nice script. Thanks @cuixiping

I think we can keep the English example names for now.

  • The English names relates to names of "typical" examples (helloworld, quine, fizzbuzz etc.) for many languages. I think the examples/IDE serves as a doorway for people coming from other languages, and it's nice to have some familiarity.
  • It makes jumping between examples easier in the IDE. For me, I usually click on the <select> and type the first few letters of the name of the example, and that example get's highlighted and I simply press Enter to jump to the example. Oftentimes I find myself checking multiple examples simultaneously, so this is invaluable.

Of course, we can change the filenames to Chinese, and then write a table that maps them to English, etc. etc. We can write a new GUI element to search the examples, etc. etc.. But I think we can better utilize our time making more meaningful progress :)

@cuixiping
Copy link
Contributor Author

Can we rename them to English with Chinese?
For example helloworld-問天地好在.wy

@cuixiping
Copy link
Contributor Author

I tried rename them to English with Chinese locally. It looks like this.
How do you think about this?

image

image

@LingDong-
Copy link
Member

Hi @cuixiping ,
Thanks for trying it out. However I'm afraid I don't like it, I think it just adds redundancy to the filenames. If we do this, whenever we want to refer to an example, we need to type both the English and the Chinese name, switching input method halfway. Filename are just identifiers that distinguish the files from one another. There's no need to be comprehensive. 名者實之賓也 :P
Thanks!

@cuixiping
Copy link
Contributor Author

OK. I understand. English filename is simple and easy enough.

@antfu antfu mentioned this pull request Jan 2, 2020
LingDong- added a commit that referenced this pull request Jan 20, 2020
Auto generate examples README.md by nodejs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants