为什么有些框架拒绝放弃对旧 Java 版本的支持?

发布于 2024-09-12 11:49:45 字数 853 浏览 2 评论 0原文

当我坐在这里修改 PircBot 时,我刚刚注意到整个后端都已编写支持 Java 1.1。它有一个自定义队列实现,使用哈希表,基于 wait() 和 notification() 信号的自定义生产者/消费者实现等。甚至 Commons-lang 也缺乏对 Java 5 带来的泛型等内容的任何支持。您可以举出许多非常流行的框架的其他示例,这些框架尽最大努力支持 1.1。

我的问题是为什么?为什么 Java 社区的某些部分拒绝支持新版本?我遵循这个理论:旧版本使用旧版本的框架和旧的 JVM,新版本使用升级的框架和 JVM。您可以使用软件升级一切。

现在我可以部分理解人们仍在运行 Java 1.5,但是 1.1 呢?如果您在此之前运行过任何内容,那么您显然不会升级 JVM,因为愚蠢的策略/害怕未知的情况,因此不会升级到较新版本的软件。那么为什么我们仍然支持他们呢?

与此相关的是,如果您正在编写一个新框架,您是否应该支持 <1.5 的任何内容?您是否应该尝试分叉现有框架,将其升级到 1.5,然后与维护人员讨论如何使用它?

更具体的讨论(这是关于一般支持的): 还有充分的理由支持 JDK 1.4 ?

放弃对 JRE 1.3 的支持

As I'm sitting here modifying PircBot, I've just noticed that the entire backend was written to support Java 1.1. It has a custom queue implementation, uses hash tables, custom producer/consumer implementations based on wait() and notify() signaling, etc. Even Commons-lang lacks any support for things that Java 5 brings to the table like generics. You can pull a bunch of other examples of very popular frameworks that try as hard as they can to support 1.1.

My question is why? Why are certain parts of the Java community refusing to support new versions? I go by this theory: Old versions use older versions of frameworks and older JVMs, newer versions use upgraded frameworks and JVMs. You upgrade everything with the software.

Now I can partially understand people still running Java 1.5, but 1.1? If your running anything before that then your obviously not upgrading the JVM because of stupid policies/scared of the unkown, and therefor aren't going to upgrade to newer versions of software. So why are we still supporting them?

On a related note, if you are writing a new framework should you support anything <1.5? Should you try forking existing frameworks, upgrading it to 1.5, then talk to the maintainers about using it?

Much more specific discussions (this is about support in general):
Is there still a good reason to support JDK 1.4?

Dropping support for JRE 1.3

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

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

发布评论

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

评论(4

走过海棠暮 2024-09-19 11:49:45

因为它很容易!从 Java 1.1 到 Java 1.4,只引入了一些微小的语言特性(例如 strictfp)。那么,如果不需要的话,为什么要限制自己呢?因此,假设您编写了一个 StringUtil 类或解析了 Word 文件,那么这根本不重要。从 Java 5 开始,语言就得到了改进,当然还有从 Java 1.0 到 Java 1.1 的内部类。

这仅适用于语言,而不适用于库。当然还有一些有趣的补充。

Because its easy! From Java 1.1 to Java 1.4 just tiny language features were introduced (strictfp for example). So why restrict yourself if you don't need to. So lets say you write a StringUtil class or you parse Word files then is simply does't matter. Just starting with Java 5 you have language improvement and from Java 1.0 to Java 1.1 of course inner classes.

This is just for the language and not so much for the libraries. There are interesting additions of course.

自此以后,行同陌路 2024-09-19 11:49:45

我认为最常见的原因是,后来版本中引入的新功能无论如何都没有被使用。我的意思是,如果一个库不使用泛型或高级并发功能等新功能,则根本不存在兼容性开销。

I think the most common reason is, that new features introduced in later versions are not used anyway. I mean, if a library does not use new features like generics or advanced concurrency features, there is no compatibility overhead at all.

别在捏我脸啦 2024-09-19 11:49:45

向后兼容?

更改 JVM 支持级别应该需要发布一个主要版本。即版本 1.x 到 2.x 表明了这一点。

另外,我相信您已经读过,要获得手机的最大覆盖范围,您需要以 1.1 为目标。但这可能已经很旧了。

Backward compatability?

Changing the level of JVM support, should warrant a major release. I.e. version 1.x goes to 2.x to indicate this.

Also I believe to have read that to get most coverage in mobile phones, you need to target 1.1. That may be old though.

月亮邮递员 2024-09-19 11:49:45

我知道至少有一家商业企业决定永远不会超越 1.1,以便可以使用相同的源代码在 java JVMS 和 .NET 上永远运行。

I know of at least one commercial enterprise that decided they would never move beyond 1.1 so that they could run forever on both java JVMS and .NET with the same source code.

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