Project Lombok有哪些风险? [英] What are the risks with Project Lombok?

查看:443
本文介绍了Project Lombok有哪些风险?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想出了新的一年的性能目标,并且我认为我的目标是减少代码库的大小,特别是样板,我会很有趣。我想出一个解决这个问题的行动是使用 Project Lombok 来使豆子尽可能短。但我习惯于忽视新软件和方法的缺点,所以我依赖Stack Overflow社区:有谁能告诉我为什么龙目岛是一个坏主意?

I'm coming up with performance goals for the new year, and I thought I'd be fun to put a goal to reduce the size of the code base, especially boilerplate. One action I've come up with to address this is to use Project Lombok to make beans as short as they should be. But I have a habit of overlooking downsides to new software and approaches, so I'm relying on the Stack Overflow community: Can anyone tell me why Lombok is a bad idea?

推荐答案

主要缺点是IDE支持。由于Lombok实际上并不是语言更改,并且由于您的IDE只能理解java,因此您需要一个支持Lombok的IDE才能使其正常工作。截至目前,仅包含Eclipse和IntelliJ的Eclipse 。如果您使用可能没问题的eclipse,但请记住,您也正在为未来的开发人员做出决定。

A major downside is IDE support. Since Lombok is not actually a language change, and since your IDE only understands java, you will need an IDE that supports Lombok to get things working right. As of now, that's only Eclipse that includes Eclipse and IntelliJ. If you use eclipse that might be ok, but remember that you are making a decision for future developers as well.

我建议你考虑将一些代码转换成一种不那么礼仪的语言,比如groovy。我们已经成功地将我们的一些业务逻辑和模型转变为groovy,并且它的工作非常顺利。

I'd suggest you consider moving some of your code into a less ceremonial language such as groovy. We've had success moving some of our business logic and models into groovy and it works really smoothly.

这篇关于Project Lombok有哪些风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆