Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

My 10 favorite haxe language features in 30 mins

2,275 views

Published on

The Haxe Programming Language was designed to be simple and powerful.

Its toolkit provides an incredibly fast cross-compiler (JS, PHP, C++, Java, C#, Python…).

In this lightning talk, Francis will introduce the grammar, and will list the features that he likes the most. As you can imagine, the goal of this presentation is not to showcase a non-exhaustive list of features, and certainly not to teach haxe language.

This will be more a quick and deep introduction about this open-source platform, to share with everyone love and power, and maybe, who knows... This will make you want to get started.

Published in: Technology
  • Be the first to comment

My 10 favorite haxe language features in 30 mins

  1. 1. haxe language my ten favorite features in 30 mins
  2. 2. haxe ❤ story ?
  3. 3. what is haxe? ● free and open source toolkit
  4. 4. what is haxe? ● free and open source toolkit ● statically typed programming language
  5. 5. what is haxe? ● free and open source toolkit ● statically typed programming language ● cross compiler for 10 targets (C++, JS, PHP, Java, Python, Lua…)
  6. 6. what is haxe? ● free and open source toolkit ● statically typed programming language ● cross compiler for 10 targets (C++, JS, PHP, Java, Python, Lua…) ● cross-platform standard library
  7. 7. what is haxe? ● free and open source toolkit ● statically typed programming language ● cross compiler for 10 targets (C++, JS, PHP, Java, Python, Lua…) ● cross-platform standard library ● allows access to each native platform APIs/libraries
  8. 8. haxe hello world http://try.haxe.org/#05485
  9. 9. conditional compiling works in pair with compiler arguments
  10. 10. conditional compiling works in pair with compiler arguments
  11. 11. static analyser code optimization ● unused variables ● unreachable code ● and more...
  12. 12. type inference @compile-time automatic deduction of the data type of an expression
  13. 13. type inference
  14. 14. type inference less verbosity http://try.haxe.org/#42127
  15. 15. type inference how does it work?
  16. 16. type inference works with composite types
  17. 17. static extension augmenting types
  18. 18. static extension augmenting types
  19. 19. array comprehension initialize arrays with ease
  20. 20. abstract modify/augment concrete type behaviors
  21. 21. abstract example http://try.haxe.org/#859e3
  22. 22. abstract enums abstract http://try.haxe.org/#0d1A7
  23. 23. abstract operators overloading
  24. 24. abstract operators overloading
  25. 25. abstract operators overloading
  26. 26. abstract operators overloading
  27. 27. abstract operators overloading
  28. 28. abstract implicit casting
  29. 29. abstract implicit casting
  30. 30. abstract implicit casting
  31. 31. abstract implicit casting
  32. 32. abstract implicit casting
  33. 33. inlining Allows function bodies to be directly inserted instead of calling them
  34. 34. inlining code optimization http://try.haxe.org/#B150C
  35. 35. metadata @nnotations at runtime and compile-time
  36. 36. metadata annotations @runtime and @compile-time ● class declaration
  37. 37. metadata annotations @runtime and @compile-time ● class declaration ● any class field
  38. 38. metadata annotations @runtime and @compile-time ● class declaration ● any class field ● enum declaration
  39. 39. metadata annotations @runtime and @compile-time ● class declaration ● any class field ● enum declaration ● enum constructors
  40. 40. metadata allowed values ● constants
  41. 41. metadata allowed values ● constants ● array declarations
  42. 42. metadata allowed values ● constants ● array declarations ● object declarations
  43. 43. metadata example on class fields
  44. 44. metadata example on class fields
  45. 45. metadata constant identifier
  46. 46. pattern matching
  47. 47. pattern matching switch expression Process of branching depending on a value matching
  48. 48. pattern matching | operator
  49. 49. pattern matching match against fields
  50. 50. pattern matching match against values
  51. 51. pattern matching with guards
  52. 52. pattern matching with extractors Allows to check if transformations match values
  53. 53. pattern matching with extractors
  54. 54. pattern matching with extractors
  55. 55. macros
  56. 56. macros black magic @compile-time
  57. 57. macros black magic @compile-time ● Initialization macro
  58. 58. macros black magic @compile-time ● Initialization macro ● Build macro
  59. 59. macros black magic @compile-time ● Initialization macro ● Build macro ● Expression macro
  60. 60. macros expression example
  61. 61. macros build example
  62. 62. macros simple build example
  63. 63. macros annotation/reflection parser example hexMachina annotation reader
  64. 64. real macro use case DSL compilation
  65. 65. DSL PARSING/ASSEMBLING FLOW Xml Parser parses
  66. 66. DSL PARSING/ASSEMBLING FLOW Xml Parser Assembler parses translates
  67. 67. DSL PARSING/ASSEMBLING FLOW Xml Parser Assembler Context Factory parses translates Runtime @pplication builds
  68. 68. DSL PARSING/COMPILING FLOW Xml Parser Assembler CompileTime Factory parses translates Generated Code generates
  69. 69. After compilation JavaScript is generated
  70. 70. DSL CHECKING @compile time type not found
  71. 71. and now...
  72. 72. best feature ever
  73. 73. best feature ever .
  74. 74. best feature ever ..
  75. 75. best feature ever ...
  76. 76. best feature ever guess what
  77. 77. best feature ever ❤
  78. 78. haxe community ● haxelang - google group ● twitter - #haxe ● stack overflow ● HaxeFoundation - github ● haxe.io
  79. 79. questions ?

×