dsfdsf48652 2011-09-07 11:01
浏览 26
已采纳

是什么让其他语言在快速开发方面比Java更快? [关闭]

Many people say developing in Python, Ruby, PHP ...etc is much faster than Java.

Question is, why? In terms of coding, IDEs, available libraries... etc. Or is the speed in making the first prototype only?

I'm interested in answers from people who worked long time on Java and long time on other languages.

Note: I have developed for .Net before Java and yes it was faster to make some apps, but on the long run (large web projects) it will become like Java.

  • 写回答

4条回答 默认 最新

  • dsceme82487 2011-09-07 11:04
    关注

    I think the main advantage of the rapid development languages is dynamic typing, where you do not have to put in any effort for static types, as e.g. in Java's

    public List<Tree<N extends Iterator, E super Interface1 & Interface2>> 
      = new ArrayList<Tree<N extends Iterator, E super Interface1 & Interface2>>();
    

    ... and later on think about type erasure.

    With dynamically typed languages, you do not have that concern, but can quickly duck-type away. That's faster and often results in more readable code (less type information/noise, see example above). You do need thorough tests, though, but with TDD & documentations via tests, they are nowadays usually written anyways.


    And now to some historical examples about statically vs. dynamically typed languages ;)

    When the discontent with C++ grew, the dynamically typed language Smalltalk was getting more popular. But then Java came along. Although Smalltalk had good testing techniques already (xUnit was born in the Smalltalk field), thorough testing got popular only later. I think that is the reason for the rise of dynamic languages now. You do need very thorough tests there because e.g. a simple typo in a message call is only detected at runtime.

    But maybe now that type inference gets better, we'll have a similar situation again and Scala will thwart the second rise of dynamic languages ;)


    Update: I found this thorough programmers.stackexchange post about static vs. dynamic typing. It lists a lot of papers to read, and also considers productivity.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害