-
Notifications
You must be signed in to change notification settings - Fork 14
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
question about input Japanese identifers when programming #2
Comments
Hi!
Yes. I do switch to Japanese input method. I rarely use VS code, so I do not know about auto-completion popup in VS code, however, Hope it helps. BTW, Hiroyuki is my first name... :-) |
Sorry! Mr. Musha. Thanks for the quick response. Interestingly when I type "今" using Chinese input method, auto-completion does appear in my VS Code even without our extension, as you see in the screenshot. I'm not sure why it didn't work for you. Our extension actually provides auto-completion of Chinese identifiers even if programmer types in Chinese pronunciation in English letters. Thus it saves user from some switching to Chinese input method. Take your sample code above as example, if "今回の賭け金の合計" is spoken as "Konkai no kake-kin no gōkei" in Japanese, a Japanese version of our extension in my mind would provide auto-completion as below, when user types in "kon": As I haven't used Japanese input method before, I wonder if this looks right to you? Do you think this type of extension would be helpful? BTW may I ask which IDE you use? |
Yes, this looks quite helpful. (Do you have Japanese pronunciation dictionary of some kind?) One of the problems of using Japanvese identifiers is that programmers (especially novice ones) I use emacs (it is not IDE...). |
I haven't looked for Japanese pronunciation dictionary yet. For our extension, we used this API to get pronunciation for Chinese, which doesn't rely on any online web service. Do you know of similar JavaScript API for Japanese? Actually this extension would save many input method switching but you may still need to use Japanese input method when you type in a new identifer the first time. About the special characters like {}() and spaces, many Chinese input methods have an option "use English punctuations when typing Chinese", so this issue is not that troublesome when using Chinese identifiers when programming in English programming languages. As I'm not familiar with Japanese language, do you know anyone that could be interested in working on such an extension together? I saw you were giving JavaScript classes all along. May I ask if you use Japanese identifiers while teaching? And do students use emacs in the classes too? |
This is true, but "first time only" is far better.
Never!!! They are beginners and I recommend VERY simple editors. The API includes Japanese sound "kon" for "今," you mean... I see... free (?) Japanese (pronunciation) dictionary might be available from the following site, I think. -- |
Thanks a lot for sharing. It's exciting to see more practice of naming identifiers in native language in Japan. We also see more such practice among Chinese developers. For example this similar plugin that assists Chinese identifier auto-completion for IntelliJ IDEs is getting close to 90K downloads. |
Especially for beginners, it is easier for them to program , if they can use native words for identifiers, I think. Good luck for your project! |
Interestingly quite some beginners have an impression that identifiers have to be written in English. Using sample codes with Japanese identifiers like your book definitely helps to correct that wrong impression. Hope to see more such programming books. Good luck to your programming courses! |
Hi Mr. Hiroyuki, I'm a contributor of an VS Code extension that allows programmers to input Chinese identifiers without switching to Chinese input method. I've a related question as I found you were using Japanese identifers in sample codes for your book "初めてのJavaScript 第3版"。I should have opened this issue in ljs3 repo but I didn't find "issues" section there.
May I ask how you input Japanese identifers when programming? For example in your sample code below:
When you input line 24, do you type in "if(" in English, and then switch to Japanese input method, input "今", and then select "今回の賭け金の合計" in the auto-completion popup?
I'm asking this to see if there's a need for a similar extension as we built for Chinese identifiers.
Thanks and looking forward.
The text was updated successfully, but these errors were encountered: