#2738 The Fanx 2.0 now support Async/Await

go4 Sat 16 Feb 2019

Fanx is a language that adds type generic and many new features to Fantom.

The v2.0 features:

Async/Await Coroutine

The C#/Javascript like async/await pattern.

async Void foo(Int id) {
  user := await getUser(id)
  image := await getImage(user.image)
  imageView.image = image
}

The use case for GUI callback and server side asynchronous IO.

Checked Dynamic Invoke

Aspect Oriented Programming by ~> invoke

//same as bar.trap("foo", arg)
bar~>foo(arg)

Primitive type

More primitive type: Int8/Int16/Int32/Int64/Float32/Float64.

Named Param

foo(name:0, name2:1)

Virtual Class

Class default is final

virtual class Base {}

Learn More

srm Mon 18 Feb 2019

Hello,

Why such amazing features like that are not in fantom ?

SlimerDude Mon 18 Feb 2019

Go4 - it's great to see you continually trail-blaze Fantom development!

Srm - like most people, the Fantom developers have day jobs and families, so unless there's a professional need for a feature within their industry, it's not going to be at the top of their priority list.

siloam Mon 6 May 2019

It would be great if async-await syntax will appear in next Fantom release. I will keep my fingers crossed!

Login or Signup to reply.