天蓬老师2017-04-17 13:02:09
Shouldn’t it be exciting to see Python? . .
Holy shit, the code can still be written like this!
Or so. . .
I wonder if I really don’t need to write braces to know what I’m talking about!
PHP中文网2017-04-17 13:02:09
Try jruby, jython.
PS: Shouldn’t real programmers focus on algorithms? When did they start worrying about grammar?
Look at this article: Go to hell! You infidel!
天蓬老师2017-04-17 13:02:09
Scala and other JVM-based languages
Python, ruby and other versions ported to JVM
IDEs can sometimes make up for the lack of syntactic sugar
迷茫2017-04-17 13:02:09
It means you are not familiar with those syntactic sugars, which means you are not familiar with the language itself.
What to do?
Of course, first read the documentation to understand the general language, and write a little code to familiarize yourself with the various uses of this language. Reading and writing are gradual, and it would be strange if they don't improve.
PHP中文网2017-04-17 13:02:09
For Java programmers, the culture shock may be really severe when looking at Ruby directly. Should you consider taking it step by step?
For example, Java => PHP => Python => Ruby. This sequence is basically getting sweeter and sweeter and you can slowly adapt to it
By the way, if you want to see how sweet it is, there is a branch of CoffeeScript called Coco
err, result <-! readFile 'namevaluelist.json'
throw that if err
for {name, value} of JSON.parse result => console.log "#{name}=#{value}"
I improvised a short paragraph to show some candies, translated into JS it looks like this
天蓬老师2017-04-17 13:02:09
I guess people who use dynamic languages a lot will want to cry even more when I look at your JAVA code! Why are you so coquettish?
People think they are an artistic youth, but in their eyes you may be a 2B youth!
巴扎黑2017-04-17 13:02:09
Syntactic sugar is a good thing, you must learn to accept it! When you get used to it, you will find that Java syntax is too monotonous. Of course, misuse of syntactic sugar means...
PHP中文网2017-04-17 13:02:09
Programmers have to keep pace with the times, each has its own benefits, and you should get in touch with the relevant ones. Syntax sugar is easy to use, and Java 8 also adds support for syntax sugar. Come on.