fugue

51 views
Skip to first unread message

Harshad RJ

unread,
Sep 20, 2013, 3:17:03 AM9/20/13
to xtend...@googlegroups.com
While working with guava, I find lots of gotchas. There's no Either class (and the issue is under review for more than an year), Optional is not an iterator, etc.

What if xtends supports fugue instead? Looks like its actively maintained, is functional oriented and developed by atlassian.

--
Harshad RJ

Harshad RJ

unread,
Sep 20, 2013, 4:46:42 AM9/20/13
to xtend...@googlegroups.com
While working with fugue I encountered a bug with Xtend:

Xtend code:
class EitherTest {
  com.atlassian.fugue.Either<Integer, Boolean> e1;

  def void m() {
    val Boolean b1 = e1.right().get();
  }
}


This generates the following Java:

import com.atlassian.fugue.Either;
import com.atlassian.fugue.Either.RightProjection;

@SuppressWarnings("all")
public class EitherTest {
  private Either<Integer,Boolean> e1;
 
  public void m() {
    RightProjection _right = this.e1.right();
    final Boolean b1 = _right.get();
  }
}


There are two problems here:
  • The RightProjection type is being used raw (generic type information is lost). This makes the Either class useless.
  • In this particular case a type mismatch error is being marked by Eclipse in the generated Java code on the last line. The Xtend code itself doesn't show any errors.

Sebastian Zarnekow

unread,
Sep 20, 2013, 4:57:53 AM9/20/13
to xtend...@googlegroups.com
Thanks for the feedback. Could you please file a ticket?


--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

signature.asc

Harshad RJ

unread,
Sep 20, 2013, 5:09:26 AM9/20/13
to xtend...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages