Home  >  Q&A  >  body text

python - 资深JAVA粉,看动态语言各种"动态语法"想哭怎么破

伊谢尔伦伊谢尔伦2741 days ago812

reply all(18)I'll reply

  • 天蓬老师

    天蓬老师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!

    reply
    0
  • PHP中文网

    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!

    reply
    0
  • 天蓬老师

    天蓬老师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

    reply
    0
  • 阿神

    阿神2017-04-17 13:02:09

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

    reply
    0
  • 迷茫

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

    reply
    0
  • PHP中文网

    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

    reply
    0
  • 天蓬老师

    天蓬老师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!

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 13:02:09

    Syntax sugar is highly summarized. . .

    reply
    0
  • 巴扎黑

    巴扎黑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...

    reply
    0
  • PHP中文网

    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.

    reply
    0
  • Cancelreply