Neuigkeiten aus dem Haxe-Universum

Am 14. Oktober fand eine kleine Online-Konferenz HaxeIn 2020 statt . Einer der Redner war Alexander Kuzmenko , der Entwickler des Haxe-Compilers.

Alexanders Vortrag ist ein Bericht über die Arbeit seit Februar 2020 (als HaxeUp Hamburg von Inno Games moderiert wurde). Ich mache Sie auf eine Abschrift seiner Rede aufmerksam.







Bild







Was wurde in der Zwischenzeit getan?



benchs.haxe.org



, Haxe. , AlexHaxe.

https://benchs.haxe.org/, — github.

, . Haxe — , JVM - ( , ). , , .







Bild







Haxe 4.1



Haxe 4.1 ( Haxe 4.0). 4.1 :







  • JVM ( JVM ). , .
  • SSL Haxe (eval-)
  • . , . .
  • , , .


, Haxe 4.1 , , . ( ), Haxe 4.1 IDE.







Bild







dts2hx



2 Haxe 4.1 dts2hx — TypeScript Haxe-, JavaScript. , JavaScript-.

Haxe Foundation, dts2hx ( , ).







Bild







Haxe 4.1:

JVM-. — - ( pull request ), .. - — Java-. ( ), , , , , Haxe- JVM - Java. JVM- — Haxe, :







  • Java, ,
  • Haxe - JVM, JavaScript-
  • . — jar-
  • JVM — , Haxe. , , Java — ( ). , formatter ( formatter ) JVM- .


Bild







SSL eval- ( Haxe) https- .

API Mbed TLS SSL ( Haxe SSL).







Bild







haxe.Exception



.

(, , , ). Haxe 4.1 (.. ), haxe.Exception



( ) -.

, haxe.Exception



. , , haxe.Exception



(, ), "" , haxe.Exception



. , Dynamic



(.. ) Haxe 4.1.







Bild







: Haxe haxe.CallStack



, . (rethrow exception), . ( ).







Bild







, :







  • . , - ( ), ,
  • haxe.Exception



    . , Haxe
  • . , Haxe jar jar Java, , Haxe-, Java- - .


Bild







catch



— , haxe.Exception



.







Bild







Tail recursion elimination



(tail recursion elimination) .

, , , ( ).

, , .







Bild







( -D analyzer_optimize



).

, (inline), (final) . , ( ).

-D no_tre



.







Bild







Haxe 4.1 :







  • ,
  • Null- (Null Safety) — StrictThreaded, , . Strict- , .
  • , ( JavaScript Source Maps) — .
  • Std.is



    (deprecated), Std.isOfType



    . is



    ( Haxe 4.2).


Bild







Haxe Evolution 2020



- Haxe Evolution, Haxe ( , , ).

. issue , .







Bild







Void



" "
(unit type). , : Void



, , , - . , Void



(Promise



), . Haxe .

, .. , , Void



, , Void



.







Bild







. AST . .







Bild







, Haxe , — . . , : , @.haxe.meta.MetadataType



, . , .. , — , . , .







Bild







. , , - , , . , .







Bild







( C# Java) . , Haxe . , .







Bild







- . : , ( ); , - , .







Bild







, . Haxe — , , . , .







Bild







Haxe, . , this



( ). , . , : Haxe as



, , .







Bild







- (generic types) . , (, ) - (, String



). , typedef



, , , .

, , , , , , , ?







Bild







this



, , . , .. . , , .







Bild







(type parameter variance of enum).

, , enum



Int



, enum



Float



( ) — , . , , , . , .

, .. — enum



, (, ). , C#, in



out



-.







Bild







Haxe 4.2



, Haxe .

Haxe 4.2. , .. , ( , ).







:

(Module-level static fields), , - . , , . , .







Bild







, . "" Java:







  • ,


Shape



, API — Shape



vertices()



, . Square



.

, - , .







Bild







sys.thread.Thread



Haxe 4.2 ( , ) — (event loops) ( NodeJS libuv):







  • ,
  • . , - (callback)
  • , .. Haxe 4.2, , , . Haxe 4.2 , .


Bild







API sys.thread.Thread



Thread.createWithEventLoop()



, , . , , , , :

, :







secondary.events.run(() -> {
    trace(‘This is printed from the secondary thread’);
});
      
      





, secondary



.







, , , secondary



, , :







mainThread.events.run(() -> {
    trace(‘This is printed from the main thread’);
});
      
      





( ).







, .. Haxe , secondary



, , , secondary



. Sys.sleep(2)



.







Bild







(, Thread.create()



, API ) , sys.thread.NoEventLoopException



.







: secondary



, , ( secondary



).







Bild







— "", , , .







: "" , , ( , ) . , , , , , Sys.sleep(2)



— .







Bild









( ):







  • ( )
  • (variance forwarding), "" (underlying type)
  • (constructor forwarding). Haxe 4.1 (@:forward



    @:forwardStatics



    ), Haxe 4.2 @:forward.new



    .


— 40 -.







Bild







:

, (transitive casting), @:transitive



. .







("" ). Haxe 4.1 (Array<Int>



) , Collection



. , Collection



Array<Int>



( Items



). Haxe 4.2 ( ) — @:transitive



Collection



, Items



, , Collection



Array<Int>



(.. Items



Array<Int>



):

var collection:Collection = [123];









, Array<Int>



Collection



:

var array:Array<Int> = collection;









Bild







(variance forwarding) . :

Haxe 4.1 Array<Int>



Array<Money>



, Money



— , Int



. , @:forward.variance



, "" , , Int



, Money



.







Any



, . Dynamic



, -. Any



.







Bild







, :







  • Haxe 4.2 is



    . Haxe 4.1 — . is



    Std.isOfType()



    ( ), .
  • Python API — sys.thread.Thread



    .
  • (object inlining). . , , , .
  • . , , 2- Haxe ( 1 2). , , , , .


Bild







WIP



Haxe 4.2, :

API. API , API.







API C API , , API .







API , .







Bild







API Libuv, Haxe (eval-), API Libuv , .







OCaml- Luv.

, Libuv ( ).







Bild









:







  • Haxe
  • Es wird plattformübergreifende Implementierungen von Ganzzahltypen wie 8- und 16-Bit-Ganzzahlen mit Vorzeichen und Vorzeichen usw. geben.
  • Es werden auch Methoden mit einer variablen Anzahl von Argumenten (Restargumente) unterstützt. Die Arbeiten an ihnen hatten bereits begonnen, wurden jedoch verschoben.


Bild







Vielen Dank für Ihre Aufmerksamkeit! Ich hoffe, Sie fanden dieses Material interessant.








All Articles