为什么 Xtext 不再生成 Xtend 类?
Why does Xtext no longer generates Xtend classes?
我正在重构一个在旧版本上开发的 Xtext 项目,我注意到,默认情况下,Xtext 框架现在生成 Java 类 代替以前的 Xtend 类.
Xtext 项目最近在向 Java 发展吗?这是为了利用 Java 的更新吗? Xtext 中的 Xtend 是什么意思?
我很好奇,因为我的项目使用了很多扩展方法和字符串模板,所以我需要知道是否应该在某个时候更新我的代码。
https://blogs.itemis.com/en/xtext-2.20-release
To be more specific, we still think that Xtend is the most powerful language supporting template expressions. The most common use case for this are code generators. Besides that, writing unit tests with Xtend feels much cleaner than with Java.
However, we decided to encourage to use Xtend only for these areas, and not as the primary general-purpose language. And we start doing this with the “New Project” wizard. The configuration that this wizard creates for a new Xtext project, will now use Java as the language for generated skeleton classes, so that newly-created projects (and especially new users) are using Java by default.
The Xtext project started to discourage the usage of Xtend where the latter’s language features do not have a significant benefit over Java. And internally, the project started to refactor the codebase to follow this recommendation.
我正在重构一个在旧版本上开发的 Xtext 项目,我注意到,默认情况下,Xtext 框架现在生成 Java 类 代替以前的 Xtend 类.
Xtext 项目最近在向 Java 发展吗?这是为了利用 Java 的更新吗? Xtext 中的 Xtend 是什么意思?
我很好奇,因为我的项目使用了很多扩展方法和字符串模板,所以我需要知道是否应该在某个时候更新我的代码。
https://blogs.itemis.com/en/xtext-2.20-release
To be more specific, we still think that Xtend is the most powerful language supporting template expressions. The most common use case for this are code generators. Besides that, writing unit tests with Xtend feels much cleaner than with Java. However, we decided to encourage to use Xtend only for these areas, and not as the primary general-purpose language. And we start doing this with the “New Project” wizard. The configuration that this wizard creates for a new Xtext project, will now use Java as the language for generated skeleton classes, so that newly-created projects (and especially new users) are using Java by default.
The Xtext project started to discourage the usage of Xtend where the latter’s language features do not have a significant benefit over Java. And internally, the project started to refactor the codebase to follow this recommendation.