Meta tags:
Headings (most frequently used words):
edit, types, haxe, compiler, navigation, namespaces, vanchor, tools, contents, history, language, internal, architecture, see, also, references, external, links, menu, targets, advantages, of, type, system, modules, and, classes, generics, enumerated, anonymous, function, abstract, structural, typing, mw, parser, output, target, text, background, color, b1d2ff, personal, views, search, contribute, print, export, in, other, projects, languages,
Text of the page (most frequently used words):
the (105), haxe (93), and (62), type (37), types (37), for (29), language (27), programming (26), can (25), #function (24), code (23), edit (22), source (21), compiler (21), are (20), flash (18), server (17), that (16), public (15), adobe (14), platform (14), string (14), this (13), languages (13), from (13), with (13), int (13), using (12), also (12), javascript (11), support (11), var (11), desktop (11), typing (10), float (10), file (9), 2005 (9), php (9), list (9), time (9), static (9), typedef (9), which (9), java (9), wikipedia (8), use (8), was (8), development (8), new (8), targets (8), abstract (8), anonymous (8), system (8), functions (8), platforms (8), mobile (7), software (7), library (7), enum (7), target (7), run (7), class (7), used (7), compile (7), text (6), license (6), other (6), not (6), frameworks (6), web (6), syntax (6), features (6), lua (6), specific (6), one (6), return (6), following (6), they (6), case (6), pack (6), foundation (5), 2022 (5), version (5), tools (5), different (5), ocaml (5), functional (5), object (5), side (5), module (5), package (5), actionscript (5), november (5), 2021 (5), github (5), haxefoundation (5), interpreter (5), alpha (5), open (5), foo (5), many (5), structural (5), example (5), data (5), but (5), same (5), all (5), classes (5), modules (5), added (5), python (5), released (5), developers (4), under (4), page (4), links (4), paradigm (4), retrieved (4), org (4), html5 (4), libraries (4), comparison (4), visual (4), studio (4), mtasc (4), either (4), 2012 (4), nicolas (4), standard (4), written (4), into (4), multiple (4), ast (4), their (4), bytecode (4), bar (4), interfaces (4), 100 (4), kilometer (4), between (4), allowing (4), like (4), values (4), score (4), have (4), supports (4), algebraic (4), color (4), methods (4), each (4), access (4), annotations (4), such (4), import (4), dynamic (4), programs (4), 2019 (4), cli (4), nekovm (4), files (4), about (3), available (3), may (3), april (3), cite (3), related (3), navigation (3), more (3), history (3), namespaces (3), create (3), short (3), typed (3), gpl (3), multi (3), based (3), https (3), ide (3), devtools (3), google (3), typescript (3), media (3), flex (3), openfl (3), air (3), swf (3), website (3), mode (3), cross (3), option (3), archived (3), original (3), make (3), macros (3), eval (3), 2007 (3), cannasse (3), ides (3), supporting (3), journal (3), 2009 (3), 2014 (3), apis (3), free (3), see (3), completion (3), compiling (3), backends (3), checking (3), various (3), anyfoobar (3), only (3), possible (3), value (3), needed (3), one100miles (3), miles (3), existing (3), binary (3), first (3), argument (3), structure (3), keyword (3), rgb (3), toint (3), red (3), similar (3), enumerated (3), generic (3), birth (3), name (3), date (3), constant (3), private (3), contain (3), supported (3), has (3), includes (3), general (3), ability (3), jvm (3), hashlink (3), byte (3), core (3), since (3), browser (3), 2006 (3), sep (3), view (2), contact (2), privacy (2), policy (2), terms (2), apply (2), you (2), non (2), inc (2), export (2), wikidata (2), information (2), pages (2), upload (2), changes (2), portal (2), help (2), article (2), contents (2), main (2), search (2), talk (2), categories (2), description (2), errors (2), statically (2), pattern (2), matching (2), node (2), ajax (2), ecmascript (2), engines (2), table (2), editors (2), inspector (2), client (2), opa (2), nim (2), toolkit (2), emscripten (2), dart (2), coffeescript (2), real (2), protocol (2), animation (2), framework (2), player (2), formats (2), official (2), external (2), macro (2), mailing (2), via (2), release (2), docs (2), introduction (2), references (2), provide (2), speed (2), frontend (2), internal (2), architecture (2), foobar (2), test (2), trace (2), named (2), implicit (2), oriented (2), conversion (2), right (2), mile (2), inline (2), default (2), purposes (2), denote (2), both (2), declare (2), uses (2), denoted (2), common (2), examples (2), per (2), arguments (2), haskell (2), defined (2), follows (2), below (2), parametric (2), blue (2), green (2), switch (2), solutions (2), arg (2), identity (2), generics (2), getfullyear (2), age (2), icreature (2), those (2), fields (2), variables (2), will (2), final (2), pack2 (2), definition (2), folder (2), them (2), nominal (2), offers (2), called (2), although (2), built (2), enables (2), programmer (2), native (2), reflection (2), performance (2), advantages (2), 2016 (2), game (2), consoles (2), net (2), ios (2), android (2), macos (2), linux (2), windows (2), 2008 (2), engine (2), allows (2), enable (2), content (2), compiled (2), elimination (2), directly (2), gnu (2), success (2), were (2), popular (2), set (2), idea (2), externs (2), describe (2), http (2), mit (2), march (2), ago (2), jump (2), cookie, statement, statistics, disclaimers, additional, site, agree, registered, trademark, profit, organization, wikimedia, creative, commons, attribution, sharealike, last, edited, utc, українська, türkçe, svenska, suomi, русский, polski, 日本語, nederlands, italiano, 한국어, français, español, eesti, deutsch, català, wikibooks, projects, printable, download, pdf, print, item, permanent, link, special, what, here, recent, community, learn, contribute, donate, random, current, events, read, views, english, log, account, contributions, logged, personal, menu, hidden, articles, cs1, missing, periodical, compilers, created, index, title, oldid, 1080717350, john, resig, brendan, eich, douglas, crockford, people, qunit, mocha, jest, jasmine, unit, testing, wakanda, jsgi, deno, commonjs, active, webpack, bundlers, yarn, npm, managers, webauthn, webassembly, json, html, document, model, cascading, style, sheets, asm, assemblyscript, technologies, vim, team, services, express, orion, phpstorm, light, brackets, codemirror, atom, cloud9, ace, jsdoc, doc, generators, safari, opera, microsoft, edge, komodo, firefox, chrome, debuggers, concepts, websharper, reason, purescript, morfik, livescript, closure, elm, clojurescript, babel, atscript, transpilers, objective, supersets, jslint, jshint, eslint, analysis, category, macromedia, futurewave, flow, messaging, protected, streaming, television, films, thoughts, topics, openlaszlo, swfdec, shumway, animator, papervision3d, swift, swish, max, scaleform, gfx, swfobject, lite, catalyst, builder, obsolete, wallaby, swiffy, swfmill, swftools, live, encoder, converters, ming, puremvc, stage3d, flare3d, away3d, starling, flashfirebug, scout, crossbridge, apache, powerflasher, fdt, flashdevelop, stencyl, vyond, moho, toon, boom, animate, tamarin, ruffle, lightspark, gnash, gameswf, players, swc, movie, mxml, lsos, local, shared, objects, fxg, xml, graphics, flv, video, amf, action, message, format, command, line, wait, host, port, testgadt, 2015, reference, detailing, dyachenko, vadim, 2013, yellow, after, life, good, games, post, naming, announcement, spelling, change, mail, hxnodejs, hello, requires, programmo, interview, doucet, lars, gamasutra, dear, save, your, licence, com, releases, tag, vala, scala, clojure, choices, programmers, maintain, cache, further, integrated, environments, divided, creates, performs, optimization, processed, generate, depending, translate, expansion, tree, 456, 123, plays, major, role, employs, presence, when, involved, analogous, contrast, construct, nominative, shows, explicit, assignment, thing, 160, 935, 62137, tokilometer, assumes, metric, while, legacy, automatically, convert, kilometers, reverse, latest, addition, concept, termed, refers, something, conventional, conversions, reuse, implementing, units, measurement, greatly, reduces, risk, mixing, underlying, meanings, within, except, labelled, parameter, useful, documentation, arrows, however, unlike, prominent, family, unary, thus, signatures, semantics, than, aforementioned, takes, returns, partially, applied, void, aliasforanon, denoting, explicitly, mathematical, record, representation, implement, given, alias, gadts, generalized, left, none, some, redint, rgbint, validcalls, 0x0000ff, 0x00ff00, 0xff0000, colors, important, feature, parameters, recursive, basic, inclusion, fashion, expression, elegant, complex, problems, product, now, implements, fly, interface, very, properties, instance, respectively, accessors, advanced, control, inlined, marked, must, initialized, immediately, constructor, cannot, mark, overridable, subclasses, its, containing, imported, putting, statements, organized, addressed, paths, essence, represents, several, shown, should, could, unless, present, exception, where, instead, finally, variable, declarations, without, inference, sophisticated, flexible, kinds, method, giving, erasure, constructors, polymorphic, variance, polymorphism, purpose, constructs, unusual, among, contains, check, implicitly, give, bypass, rely, handling, inferencing, strong, exceptions, iterations, comparable, handwritten, sources, extension, transformation, done, strictly, devices, prototyping, scripting, openj9, hotspot, openjdk, mono, cppia, webos, palm, zend, removed, royale, beta, phonegap, nodejs, avm2, neko, output, tier, documents, gain, full, featured, might, need, certain, beyond, responsible, generating, respective, known, consist, dce, optimize, opt, checks, nullable, null, safety, dead, loop, unrolling, folding, tail, recursion, field, inlining, optimizing, strategy, inspired, choose, best, job, typical, identically, specify, prevent, conditional, compilation, write, once, anywhere, executed, allow, modification, virtual, machines, successor, later, developed, contributors, originally, because, simple, inside, author, asserts, humorously, any, technology, began, october, overhaul, particular, environment, tool, officially, recommended, haxedevelop, most, functionalities, etc, degrees, debugging, refactoring, highlighting, intellij, interaction, safe, manner, entities, beside, exist, capabilities, header, originated, simplifying, communication, logic, runs, interpreted, math, api, creating, codebase, heaps, kha, maps, arrays, strings, numeric, across, high, level, produce, applications, base, computing, influenced, hxml, filename, extensions, s390x, ppc64el, mipsel, mips64el, mips, armhf, armel, aarch64, x86, implementation, discipline, months, stable, years, appeared, developer, confused, hack, redirected, encyclopedia, wayback, machine, archive, 20221021081856, wiki, timestamps, capture, fail, 2023, nov, oct, 2026, 396, captures,
Text of the page (random words):
amps the wayback machine http web archive org web 20221021081856 https en wikipedia org wiki haxe haxe from wikipedia the free encyclopedia redirected from haxe jump to navigation jump to search not to be confused with hack programming language cross platform programming language haxe paradigm multi paradigm developer haxe foundation first appeared november 14 2005 16 years ago 2005 11 14 stable release 4 2 5 1 6 march 2022 7 months ago 6 march 2022 typing discipline static dynamic via annotations nominal implementation language ocaml platform ia 32 x86 64 aarch64 armel armhf mips mips64el mipsel ppc64el s390x os android ios linux macos windows license gpl 2 0 library mit filename extensions hx hxml website haxe org influenced by ecmascript ocaml java javascript c php c python lua actionscript nekovm haxe is an open source 2 high level cross platform programming language and compiler that can produce applications and source code for many different computing platforms from one code base it is free and open source software released under the mit license the compiler written in ocaml is released under the gnu general public license gpl version 2 haxe includes a set of features and a standard library 3 supported across all platforms like numeric data types strings arrays maps binary reflection math http file system and common file formats haxe also includes platform specific api s for each compiler target 4 kha openfl and heaps io are popular haxe frameworks that enable creating multi platform content from one codebase 5 haxe originated 6 with the idea of supporting client side and server side programming in one language and simplifying the communication logic between them code written in the haxe language can be compiled into javascript c java jvm php c python lua 7 and node js 8 haxe can also directly compile swf hashlink and nekovm bytecode and also runs in interpreted mode 9 haxe supports externs definition files that can contain type information of existing libraries to describe target specific interaction in a type safe manner like c header files can describe the structure of existing object files this enables to use the values defined in the files as if they were statically typed haxe entities beside externs other solutions exist to access each platform s native capabilities many popular ides and source code editors have support available for haxe development 10 no particular development environment or tool set is officially recommended by the haxe foundation although vs code intellij idea and haxedevelop have most support for haxe development the core functionalities of syntax highlighting code completion refactoring debugging etc are available to various degrees contents 1 history 2 compiler 2 1 targets 2 2 advantages of haxe 3 language 3 1 type system 3 2 modules and namespaces 3 3 classes 3 4 generics 3 5 enumerated types 3 6 anonymous types 3 7 function types 3 8 abstract types 3 9 structural typing 4 internal architecture 4 1 compiler 5 see also 6 references 7 external links history edit development of haxe began in october 2005 the first alpha version was released on november 14 2005 11 12 haxe 1 0 was released in april 2006 with support for adobe flash javascript and nekovm programs support for php was added in 2008 and c was added in 2009 more platforms such as c and java were added with a compiler overhaul in 2012 haxe was developed by nicolas cannasse and other contributors and was originally named haxe 13 because it was short simple and has an x inside which the author asserts humorously is needed to make any new technology a success 14 haxe is the successor to the open source actionscript 2 compiler mtasc 15 also built by nicolas cannasse and is released under the gnu general public license version 2 or later compiler edit the haxe language can compile into bytecode that can be executed directly by the virtual machines it targets it can compile to source code in c javascript php c java python and lua haxe also has an interpreter called eval 16 this same interpreter is also used compile time to run macros which allow modification of the ast this strategy of compiling to multiple source code languages is inspired by the write once run anywhere paradigm it also allows the programmer to choose the best platform for the job typical haxe programs run identically on all platforms but developers can specify platform specific code and use conditional compilation to prevent it from compiling on other platforms the haxe compiler is an optimizing compiler and uses field and function inlining tail recursion elimination constant folding loop unrolling and dead code elimination dce to optimize the run time performance of compiled programs 17 the haxe compiler offers opt in null safety it checks compile time for nullable values targets edit in haxe supported platforms are known as targets which consist of the following modules the compiler backends that are responsible for generating the respective code the run time specific apis that go beyond the core language support platform targets the following table documents platform and language support in haxe the haxe language allows developers to gain access to many platform features but haxe is not a full featured engine they might need frameworks that enable create content for certain platforms haxe compiler targets 9 name tier output platform use since haxe version neko 3 byte code nekovm server desktop cli 2005 alpha flash swf 3 byte code flash avm2 flash player 9 air desktop browser server 2005 alpha javascript 1 source javascript html5 nodejs phonegap server desktop browser mobile 2006 beta actionscript source actionscript 3 air flex royale server desktop browser mobile 2007 1 12 removed since 2019 4 0 php 1 source php zend engine server 2008 2 0 php 5 php 7 since 2019 4 0 c 2 source c windows linux macos android ios palm webos server desktop mobile cli game consoles 2009 2 04 cppia added in 2014 3 2 c 3 source c net framework net core mono server desktop mobile 2012 2 10 java 3 source java java openjdk server desktop 2012 2 10 python 3 source python cli web desktop 2014 3 2 lua 2 source lua cli web desktop mobile 2016 3 3 hashlink 1 byte code hashlink vm or hl c compile to c file server desktop mobile game consoles c export 2016 3 4 jvm 1 bytecode jvm hotspot openj9 server desktop 2019 4 0 eval 1 interpreter haxe interpreter prototyping scripting 2019 4 0 advantages of haxe edit ability to target multiple platforms and devices using the same language ability to use strictly typed code ability to use macros syntax transformation which can be done with haxe language 18 added language features such as extension methods and functional programming the run time performance of haxe programs is at comparable speed to handwritten sources 19 language edit haxe is a general purpose language supporting object oriented programming generic programming and various functional programming constructs features such as iterations exceptions and code reflection are also built in functions of the language and libraries unusual among programming languages haxe contains a type system which is both strong and dynamic the compiler will check types implicitly using type inferencing and give compile time errors but it also enables the programmer to bypass type checking and rely on the target platform s dynamic type handling all of the native target apis can be used type system edit haxe has a sophisticated and flexible type system the type kinds it offers are classes interfaces function method types anonymous types algebraic data types called enum in haxe and abstract types parametric polymorphism is possible with classes algebraic types and function types giving the language support for generic programming based on type erasure this includes support for variance in polymorphic functions although not in type constructors the type system is static unless annotations for dynamic typing are present for use with targets that support them type checking follows nominal typing with the exception of anonymous types where structural typing is used instead finally type inference is supported allowing for variable declarations without type annotations modules and namespaces edit all haxe code is organized in modules which are addressed using paths in essence each hx file represents a module which may contain several types for example to create the type a in the package my pack as shown the folder structure should be my pack and the file could be a hx in the folder pack file my pack a hx package my pack class a in other modules other types can be imported by putting import statements below the package definition e g import my pack a a module can contain multiple types such as the following it is possible to import one type at a time from that module using import my pack2 a a type may be private in which case only its containing module can access it package my pack2 typedef a a string private typedef b b string classes edit classes keyword class in haxe are similar to those in java or typescript their fields can be either methods variables or properties each static or per instance respectively haxe supports the accessors public and private and more advanced methods for access control that are denoted using annotations methods and static constant variables can be inlined using the keyword inline fields can be marked as final to declare a constant that must be initialized immediately or in the constructor and cannot be written to in case of function final will mark as non overridable in subclasses interfaces in haxe are very similar to those in for example java interface icreature public var birth date public var name string public function age int class fly implements icreature public var birth date public var name string public function age int return date now getfullyear birth getfullyear generics edit haxe supports generic programming the following is an example of the identity function function identity t arg t t return arg enumerated types edit enumerated types are an important feature of the language they can have type parameters and be recursive 20 they provide basic support for algebraic data types allowing the inclusion of product types in a fashion similar to haskell and ml a switch expression can apply pattern matching to an enum value allowing for elegant solutions to complex programming problems enum color red green blue rgb r int g int b int class colors static function toint c color int return switch c case red 0xff0000 case green 0x00ff00 case blue 0x0000ff case rgb r g b r 16 g 8 b static function validcalls var redint toint color red var rgbint toint color rgb 100 100 100 examples of parametric enum types are the haxe standard library types option 21 and either 22 enum option t some v t none enum either l r left v l right v r haxe also supports generalized algebraic data types gadts 23 24 anonymous types edit anonymous types are defined by denoting their structure explicitly using a syntax that follows the mathematical record based representation of a type they can be used to implement structural typing for function arguments see below and can be given an alias with the keyword typedef typedef aliasforanon a int b string c float void function types edit functions are first class values in haxe their type is denoted by using arrows between argument types and between the argument type s and return type as common in many functional languages however unlike in prominent examples like haskell or the ml language family not all functions are unary functions functions with one argument only and in haxe functions can t be partially applied per default thus the following type signatures have different semantics than in the aforementioned languages the type f1 is a function that takes a string as arguments and returns a value of type float types f1 and f2 denote the same type except that f2 uses labelled parameter which is useful for completion and documentation purposes types f4 and f5 denote the same type both are binary functions that return a binary function of type f3 for f5 the syntax to declare a function type within a function type is used typedef f1 string float typedef f2 text string float typedef f3 score int text string float typedef f4 score int text string f3 typedef f5 score int text string score int text string float abstract types edit the latest addition to the haxe type system is a concept termed abstract types as used in haxe this refers to something different from a conventional abstract type they are used to make conversions between types implicit allowing reuse of existing types for specific purposes like implementing types for units of measurement this greatly reduces the risk of mixing up values of the same underlying type but with different meanings e g miles vs km the following example assumes that the metric system is the default while a conversion to miles is needed for legacy data haxe can automatically convert miles to kilometers but not the reverse abstract kilometer float public function new v float this v abstract mile float public function new v float this v to public inline function tokilometer kilometer return new kilometer this 0 62137 class test static var km kilometer static function main var one100miles new mile 100 km one100miles trace km 160 935 as the example shows no explicit conversion is needed for the assignment km one100miles to do the right thing structural typing edit in many functional programming languages structural typing plays a major role haxe employs it in the presence of anonymous types using the nominative typing of object oriented programming when only named types are involved anonymous types in haxe are analogous to the implicit interfaces of the language go as to typing in contrast with go interfaces it is possible to construct a value using an anonymous type class foobar public var foo int public var bar string public function new foo 1 bar 2 function anyfoobar v foo int bar string trace v foo static function test var fb new foobar fb anyfoobar fb fb anyfoobar foo 123 bar 456 internal architecture edit compiler edit the haxe compiler is divided into one frontend and multiple backends the frontend creates an abstract syntax tree ast from the source code and performs type checking macro expansion and optimization on the ast the various backends translate the processed ast into source code or generate bytecode depending on their target the compiler is written in ocaml it can be run in server mode to provide code completion for integrated development environments ides and maintain a cache to further speed compiling 25 see also edit free and open source software portal comparison of ide choices for haxe programmers dart programming language nim programming language opa programming language clojure coffeescript typescript scala programming language vala programming language emscripten openfl references edit https github com haxefoundati...
|