编写中/大型系统时的问题

发布于 2024-09-30 05:16:06 字数 246 浏览 0 评论 0原文

对于 Python(我非常喜欢)和 Ruby 等语言有一些炒作,但我正在用 Python 编写一个中型系统,感觉缺少一些使用 Java 时会拥有的工具:Eclipse 功能、JUnit 集成以及一些语言功能,例如在编译时捕获一些错误。

有人说 Java 作为一种语言已经死了。但大型重要软件都是用 Java 编写的:Hadoop、Lucene 等等。

对于此类中型/大型基础设施软件来说,Java 是比 Python 或 Ruby 更好的语言吗?

There is some hype with languages like Python (that I like very much) and Ruby but I was writing a medium-size system in Python and feel the lack of some tools that I would have if I was using Java: Eclipse features, JUnit integration and some language-features like catching some errors in compile time.

Some people says that Java is dead as a language. But large important software are written in Java: Hadoop, Lucene and many others.

Is Java a better language than Python or Ruby for medium/large infrastructure software like these?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

携君以终年 2024-10-07 05:16:07

真的很重要。您知道 Python/Ruby 中的某些功能使它们成为比 Java 更有吸引力的产品。大多数时候,静态类型可能是你最好的朋友,但对其他人来说却是一种痛苦。

缺乏工具与采用相关。 Java/c# 得到了广泛的采用。

公司/企业和大中型组织喜欢通过合同而不是技术优点来采购解决方案。

根据经验,Python 确实存在一些速度问题,我无法对 Ruby 发表评论,但我想如果您的应用程序需要专用速度,我不会使用 python。

另外线程和多核处理也没有Python中的那么好,虽然2.7似乎改善了很多老问题,但我认为线程的GIL问题仍然存在。

我对 Java 的唯一评论是,它现在有 Oracle 的支持,并且根据您的立场以及您对 Oracle 的喜爱程度,可能会改变您对 Java 的态度。特别是当您设计开源解决方案时。

All much of a muchness really. There are features in Python/Ruby that your aware of that make them a more appealing offering than say Java. Static typing can be your best friend most of the time, and a pain for the other.

Lack of tooling is related to adoption. Java/c# has a larger adoption.

Corporates/Enterprises and medium to large organizations, like to procure solutions with contracts as opposed to technical merits.

From experience Python does have some speed issues, I can't comment on Ruby, but I imagine that if your applications require dedicated speed I would not use python.

Also threading and multi-core processing is not as good as it could be in python, although 2.7 seems to improve a lot of the old problems, I think the GIL problem still remains for threading.

My only comment on Java is that it now has Oracle behind it, and depending where your sitting and how you like Oracle, might change your attitude to Java. especially if your designing for Open Source solutions.

梓梦 2024-10-07 05:16:06

这种问题可能会变得非常有争议......对于企业软件来说,大多数时候关键因素是政治因素,而不是技术因素。

如果您拥有这家企业,请坚持使用最适合您愿景的技术。如果没有,请使用 Java - 它在政治上更安全。

技术领域,几乎是平手。

This kind of question can get very argumentative... For enterprise software most of time the key factor is political, not technical.

If you own the business, stick with the technology that best fits your vision. If not, use Java - it is politically safer.

On the technical field, it is almost a tie.

还不是爱你 2024-10-07 05:16:06

您说 Java 更适合企业软件是有道理的。这确实是 Java 的闪光点:它非常适合企业编程。

然而,您对 Python 和 Ruby 中的工具的抱怨是没有根据的。 PyDev for Eclipse 充分利用了您在 Java 中进行开发时会喜欢的相同功能。 Ruby 有一个类似的 Eclipse 插件。这两种语言都存在 pyunit、nose 等单元测试框架(我相信 PyDev 支持单元测试)。此外,就像 Java 编译器会在编译时捕获错误一样,Python 脚本会在运行之前给出语法错误,以及(IMO)比 Java 编译器更容易理解的错误系统。

由于 Python 和 Ruby 是脚本语言,因此它们的专业领域更多地在于小任务、快速开发以及使用 Django 或 Rails 等框架。所以,是的,像 Java 这样的重型语言非常适合企业,但 Python 和 Ruby 的优雅和易用性也值得一提。

You make a valid point in saying that Java is more suited to enterprise software. That's really where Java shines: it works very well for enterprise programming.

However, your gripes about the tools in Python and Ruby are unfounded. PyDev for Eclipse takes full advantage of the same features that you would enjoy if you were developing in Java. Ruby has a similar plugin for Eclipse. Unit testing frameworks like pyunit, nose, and others exist for both languages (and I believe PyDev has support for unit tests). Also, just like a Java compiler would catch an error at compile time, a Python script will give syntax errors before you run it, along with an (IMO) much more understandable error system than a Java compiler.

Since Python and Ruby are scripting languages, their area of expertise lies more in small tasks, rapid development, and using frameworks like Django or Rails. So yes, more heavy-duty languages like Java are great for enterprise, but there's something to be said for the elegance and ease of use of Python and Ruby.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文