+ 23

Improvement Suggestions from Language Experts Please!

I am working on a little language comparison project. The idea is to write the same simple program (Bonus) in every language available on SoloLearn. It's still a work in progress and so far I have written it in 8 languages, which can be seen on my profile. https://www.sololearn.com/Profile/8489802 I am no expert in any language, so improvement suggestions for any language are very welcome. Upvotes of course also... The goal is to have a clean and nicely written implementation of "Bonus" optimized in every language available on SoloLearn.

28th Apr 2018, 2:39 PM
Modi
Modi - avatar
9 ответов
+ 5
JavaScript was missing so here's try I used the best practices that I knew to write it but I would love to hear improvements, coz I started javascript recently https://code.sololearn.com/WzLBid18EJu0/?ref=app
28th Apr 2018, 10:56 PM
Morpheus
Morpheus - avatar
+ 19
I thought something like that already. Anyway, for now I'll leave the changed names...
28th Apr 2018, 6:04 PM
Modi
Modi - avatar
+ 18
@Morpheus Very nice implementation! No comments so far. It is not 100 percent according to my criteria, but there I'm the only one to blame because I didn't write them down. Hope you don't mind that I made a copy of it in my code area, so that I can keep all the versions together. JavaScript is the next one on my list and your version will be a great help because it includes already most of it...
28th Apr 2018, 11:33 PM
Modi
Modi - avatar
+ 17
@Gordie Good point! Fixed it. Hope I didn't violate any guidelines when I renamed h and k...
28th Apr 2018, 5:54 PM
Modi
Modi - avatar
+ 17
@Morpheus No worries! Just tell me when your new version is ready and I'll update it in my area.
29th Apr 2018, 12:22 AM
Modi
Modi - avatar
+ 16
@Gordie Actually, I just wanted to limit it to SoloLearn to limit the scope, but why not extend it... I copied them. Thanks a lot! FYI: Was the first time ever in my life that I had a look at a code in either of the languages. And I'm around 15 years older than in my picture...
28th Apr 2018, 10:49 PM
Modi
Modi - avatar
+ 3
Gordie what do you mean when this account will be deactivated??
28th Apr 2018, 8:20 PM
Adam
Adam - avatar
+ 3
Gordie you deactivated your account?
28th Apr 2018, 8:29 PM
Adam
Adam - avatar
+ 3
Modi oops sorry I forgot to write comments, I ll write them thanks 👍. yes please i would be glad, I ll message when I rewrite it neatly
28th Apr 2018, 11:42 PM
Morpheus
Morpheus - avatar