Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » The future of Xtend ?
The future of Xtend ? [message #1818040] Wed, 04 December 2019 16:28 Go to next message
Elie Richa is currently offline Elie RichaFriend
Messages: 72
Registered: February 2016
Member
Hi all,

Apologies if I'm double posting - I tried a few searches and couldn't find what I was looking for.

I was surprised to discover in the Xtext/Xtend 2.20 release notes that Xtend development is being slowed down, and unless I'm mistaken, I caught the feeling that it might end up becoming unsupported in future releases. My project makes heavy use of Xtend, so that news raised a few questions that I hope the folks here might be able to answer.

1. Should we expect Xtend to be entirely phased out in the future? Or is it planned to keep being supported but without new features?

2. The release notes suggest that a lot of Xtend can be achieved with Java 10. [How] Can the following Xtend features be achieved with Java 10 as the release notes seem to suggest?

a. "extension" variables and fields
b. "import static extension"
c. handy operations on Iterable which are cumbersome on Streams

Xtend                       -> Java (approximately)
iterable.findFirst[lambda]  -> iterable.stream().filter(lambda).findFirst().orElse(null)
iterable.join(string)       -> iterable.stream().collect(Collectors.joining(string))


Please correct me if I'm not using streams in the best way :)

d. template strings with smart whitespace/indentation handling


Thanks!


Elie Richa, Ph.D
Software Engineer, AdaCore
https://www.adacore.com
Re: The future of Xtend ? [message #1818042 is a reply to message #1818040] Wed, 04 December 2019 16:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
(1) depends on what explodes in new Versions of Platform/JDT (Xbase/Xtend use a lot of internal API) and ASM. we also might not be able to support new Java Versions at some point.
the community and interesting parties have always the possibility to contribute and we invited to do so but the number of people doing this in the past was quite low.
but there are currently no concrete plans to totally ditch it.

(2) no there are a few things java cannot do right now
that are
- extensions
- rich string
- active annotations.

if you can live with the non extension / inverted syntax you can use xbases findFirst also from java.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 04 December 2019 16:46]

Report message to a moderator

Re: The future of Xtend ? [message #1818043 is a reply to message #1818042] Wed, 04 December 2019 16:47 Go to previous messageGo to next message
Elie Richa is currently offline Elie RichaFriend
Messages: 72
Registered: February 2016
Member
Hi Christian,

Thank you for the answers.

Christian Dietrich wrote on Wed, 04 December 2019 16:37
(1) depends on that explodes in new Versions of Platform/JDT (Xbase/Xtend use a lot of internal API) and ASM. we also might not be able to support new Java Versions at some point.
the community and interesting parties have always the possibility to contribute and we invited to do so but the number of people doing this in the past was quite low.
but there are currently no concrete plans to totally ditch it.


That's too bad... But I completely understand. You can't work miracles without resources.

Christian Dietrich wrote on Wed, 04 December 2019 16:37

(2) no there are a few things java cannot do right now
that are
- extensions
- rich string
- active annotations.

if you can live with the non extension / inverted syntax you can use xbases findFirst also from java.


Right. But I really really like the extension notation. I feel like that's the core feature that, if it existed in Java, would greatly improve the use of Streams since we'd be able to reuse Xbase's libraries...

We'll see how things pan out in the future. Hopefully stakeholders (such as myself) might make time to invest effort in Xtend development once they get cornered :)

Cheers!

--
Elie


Elie Richa, Ph.D
Software Engineer, AdaCore
https://www.adacore.com
Re: The future of Xtend ? [message #1818863 is a reply to message #1818043] Tue, 31 December 2019 05:27 Go to previous messageGo to next message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 256
Registered: July 2009
Senior Member
As a newcomer to Xtext (well, the second time I try to get into it), it would be nice not to have to worry about Xtend when trying to learn the basics of Xtext. What I mean is that there is sample code written in Xtend in the documentation when the same could likely be achievable in Java and it just adds more to the amount of things to get familiar with, i.e. mwe2, Google Guice, EMF, etc on top of the actual Xtext concepts, APIs, extension points.
Re: The future of Xtend ? [message #1818866 is a reply to message #1818863] Tue, 31 December 2019 06:30 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It is not necessary for users to be aware of Xtend to use Xtext. The OCL and QVTd editors demonstrate this; perhaps because they haven't tracked all the recent changes. OCL and QVTd tooling do however use Xtend, but only for distinct M2T purposes.

Regards

Ed Willink
Re: The future of Xtend ? [message #1818871 is a reply to message #1818866] Tue, 31 December 2019 08:54 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
As of now with Xtext 2.20 the wizard should create Java Code with a few exceptions like generator, formatter and tests.
This should also be reflected in the examples and documentation


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Error on retrieval of features in *Generator.xtend
Next Topic:Listening for Index-Changes
Goto Forum:
  


Current Time: Tue Apr 23 08:13:15 GMT 2024

Powered by FUDForum. Page generated in 0.03519 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top