1 of 11

Haxe�a language that compiles to...

Andy Li

Haxe Foundation

FOSSASIA 2017

C#

2 of 11

Andy Li

  • Haxe Foundation member
    • worked full-time for an year
  • spoke at
    • WWX 2015, 2016
    • PyCon HK, HKOSCon…
  • currently a senior researcher of �TCL Research (HK)

3 of 11

Hello World!

4 of 11

*some* Haxe language features

  • C-like syntax
  • static-typing with type inferencing
  • GC
  • Int, Float, String, Array<T>, Null<T>, Void, etc.
  • basic standard library
    • haxe.Json, Xml
    • sys.FileSystem, sys.io.Process, etc.
  • access to platform APIs and native libraries
    • conditional compilation
    • externs
  • OOP
    • class, interface
    • single inheritance
  • Functional Programming
    • expression-based syntax
    • 1st-class functions
    • pattern matching
    • GADT

5 of 11

Why targeting multiple platform?

  • code reuse!
    • cross-platform for a single project
    • code sharing between multiple projects

6 of 11

Why transpile?

  • readability and performance, choose both
  • use modern language features on classic platforms

http://bayourenaissanceman.blogspot.sg/2010/12/hi-tech-gadgets-in-steampunk-guise.html

7 of 11

Why can’t _ target multiple targets like Haxe?

  • over-specification
    • large output size
    • bad run-time performance
    • long compilation time
  • lack of compile-time features
    • conditional compilation
    • compile-time macros
    • inlining, dead code elimination, etc

8 of 11

*some* popular Haxe games!

Defender's Quest: Valley of the Forgotten

http://www.defendersquest.com/

Steam reviews: Overwhelmingly Positive (1,860 reviews)

Papers, Please

http://papersplea.se/

tons of awards!

rymdkapsel

http://rymdkapsel.com/

It’s smart, and it’s impressively lean – nothing is superfluous (...)

Alec Meer, rockpapershotgun.com

It is definitely my favorite game — and I haven’t even beaten the first level yet.

Trent Wolbe, theverge.com

9 of 11

games from Nicolas Cannasse, creator of the Haxe language

Evoland

http://evoland.shirogames.com/

Evoland 1 on Steam: Very Positive (3,682 reviews)

Evoland 2 on Steam: Very Positive (1,093 reviews)

Northgard

http://northgard.net/

Steam reviews: Very Positive (1,516 reviews)

10 of 11

Haxe game on consoles!

11 of 11

Keep in touch!