python - 资深JAVA粉,看动态语言各种"动态语法"想哭怎么破
伊谢尔伦
伊谢尔伦 2017-04-17 13:00:09
0
18
835
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(18)
Peter_Zhu

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!

Ty80

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!

Peter_Zhu

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

阿神

Actually, when I see Java, it’s like reading a book from heaven~

迷茫

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.

Ty80

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

Peter_Zhu

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!

大家讲道理

Syntax sugar is highly summarized. . .

巴扎黑

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...

Ty80

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!