TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Does anyone here use Haxe?

105 点作者 mattkenefick超过 1 年前
I remember tinkering with Haxe maybe around ~2010. I was surprised to see it&#x27;s still around and getting regular updates.<p>I was (and still am, in some ways) against the idea of learning one language and trying to use it everywhere. But nowadays, there are so many transpilation and adapter systems going on that... everything is a bit fuzzy.<p>That made me remember Haxe. Their goal all along was to have one unified language to deploy anywhere.<p>Does anyone here use Haxe regularly? In production? I&#x27;d love to hear about your experiences and what you&#x27;ve used it in-place of.

23 条评论

cxr超过 1 年前
&gt; <i>Papers, Please was originally written in Haxe&#x2F;OpenFL, a combo of modern ECMA-ish language, Flash-alike API, and multi-platform build system. [...]</i><p>&gt; <i>When I finally committed to this port my first decision was to rewrite the game in C#&#x2F;Unity. After Obra Dinn I’m a solid fan of Unity – the editor, the entity&#x2F;component design, the build system, the ubiquity, just about everything.</i><p>&gt; <i>I made it a few days into rewriting before finding that although I like C#, I like Haxe more. [...] Still it’s hard to overstate how appropriate Unity is for someone in my position: a solo developer targeting multiple platforms and desperate for a popular, proven, and well-supported engine and build system.</i><p>&gt; <i>Fortunately, Haxe is a transpiled language, meaning that you write in one language (Haxe) and it gets converted to another language (Javascript, PHP, Python, C++, C#, Lua, etc) before being compiled&#x2F;interpreted for whatever target you’ve got. So it’s possible to write code in Haxe and have it transpiled to C# that can be loaded and compiled in Unity. Which is how I decided to roll this.</i><p>From &quot;Cramming &#x27;Papers, Please&#x27; Onto Phones&quot; (last year).<p>Original post: &lt;<a href="https:&#x2F;&#x2F;dukope.com&#x2F;devlogs&#x2F;papers-please&#x2F;mobile&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;dukope.com&#x2F;devlogs&#x2F;papers-please&#x2F;mobile&#x2F;</a>&gt;<p>HN comments: &lt;<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32371423">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32371423</a>&gt;
mmastrac超过 1 年前
I used it a few years later for some work with Nickelodeon. Somewhere in a backup I have some Spongebob games and a version of Pai Sho.<p>Haxe was never great, but it was a bit more efficient and productive than using the GWT-based PlayN (formerly Fourplay). The language itself was just not quite right and felt like a harder version of Java or JavaScript.<p>It&#x27;s not really a problem anymore, but compiling to ActuonScript used to be pretty buggy. Now that Flash is long dead, it&#x27;s possible that the cross-compilation problems might be lessened.<p>They also may have added some additional features making it less painful, but I&#x27;m not convinced.
评论 #38674636 未加载
kigero超过 1 年前
I use Haxe personally and professionally, and I love it. My use case is slightly different though, I work in R&amp;D, so the emphasis isn&#x27;t on production code but on getting a wide-ranging set of proof-of-concepts built quickly. For example, my current project required that we run the same logic in a Java service, Java client, Python client, and (coming soon) Javascript and C++ clients. Haxe worked great for getting that infrastructure up and running quickly in all of those locations so that production teams could start experimenting. I find that Haxe is great for that use case, I&#x27;ve got a core set of utiltiy libraries that I&#x27;ve been using for about a decade now that run in Java, Python, C++, and Javascript, so for a given new project I&#x27;ve already got a good set of code that I can use.<p>I&#x27;ve also written Maven plugins - and later when I ditched Maven, Bazel rules - to incorporate Haxe projects into our build systems that work pretty well. This makes it pretty seamless to incorporate say a Haxe built Java library into a project, and the same utilities in Javascript - including debugging in Eclipse or the browser.<p>It&#x27;s not all sunshine though, I find that Haxe-compiled Python code tends to be underperformant and needs a lot of love to become as performant as, for example, the equivalent Java code. And it is true that the community is smaller, so it can be hard sometimes to get answers to questions. But it&#x27;s still fun to write and work with, and I definitely see myself continuing to use it in the future.
评论 #38674447 未加载
the-tomster超过 1 年前
I&#x27;ve used Haxe on the web for a minimalist virtual tabletop. Not exactly production, because the only user is probably me... but my gaming group and I have used it weekly for a couple of years now, and I don&#x27;t need to spend time fussing over it. So production enough.<p>I&#x27;ve found Haxe to be pretty pleasant in this situation. The only areas I really needed a library were around graphics and input, and Heaps looked more interesting to me than the JS alternatives I looked at.<p>The language itself feels like a pleasant mush of all the Java-y OO languages, but without the entire kitchen sink included. You&#x27;ve got all the polymorphism and generic typing stuff you&#x27;d expect from a java clone, plus algebraic data types, plus the ability to drop to dynamic duck-typing if you have to. And the type inference has worked pretty well for me. Oh, it also has a macro system I&#x27;ve never needed to use.<p>The tooling situation is good but not great. The compiler&#x27;s messages have generally been clear. I am using vim + universal ctags for development, and it is fine but not as deluxe as a working LSP. I didn&#x27;t have any luck getting Haxe&#x27;s LSP working with vim, but I assume a VS Code based setup is more of a happy path and would have better luck.<p>Output-wise, the JS it generates seems fine. For my particular use case I care more about the readability and debuggability of the generated JS rather than the size. It has not been a problem to understand where an issue is coming from while looking at the generated JS.<p>Performance wise, the only issues I&#x27;ve had were caused by my own foolishness in making thousands of draw calls instead of batching things. Other than bugs I haven&#x27;t seen any performance problems.<p>When it comes to libraries, you have to contend with both the relatively small size of the community, as well as the difficulty of writing a library that actually supports all of Haxe&#x27;s compile targets. Haxe errs on the side of pragmatism instead of identical behavior on all of its supported platforms. So often you&#x27;ll find nasty platform-specific logic in the heart of libraries, and if your target isn&#x27;t supported then you have to dive in and fix it yourself. It is not a good language for grabbing a few things off of npm or cargo and slapping them together.
评论 #38678032 未加载
logo4poop超过 1 年前
Haxe is my favorite programming language. I recommend hanging out in the Discord, the community is quite active! We have had new frameworks like Ceramic [0] popping up and one of the (imo) best UI libraries: HaxeUI [0] be continuously developed. There is a bit of unrest on the future of Haxe, but I have seen development pick back up recently.<p>[0] <a href="https:&#x2F;&#x2F;ceramic-engine.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;ceramic-engine.com&#x2F;</a> [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-core">https:&#x2F;&#x2F;github.com&#x2F;haxeui&#x2F;haxeui-core</a>
评论 #38676522 未加载
armchairhacker超过 1 年前
The person who made Haxe (Nicolas Canesse) went on to found Shiro Games (<a href="https:&#x2F;&#x2F;shirogames.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;shirogames.com</a>), a game development company. I believe all their games are made in Haxe. The latest one, &quot;Dune: Spice Wars&quot; was released this September and Google says the engine is HashLink (<a href="https:&#x2F;&#x2F;hashlink.haxe.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;hashlink.haxe.org&#x2F;</a>) which is a VM for Haxe.<p>I don&#x27;t know any other companies who are releasing games in Haxe today.
评论 #38675814 未加载
评论 #38673820 未加载
DigiEggz超过 1 年前
I use Haxe and really enjoy it. I use it to develop an MMORPG (<a href="https:&#x2F;&#x2F;jamcloud95.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;jamcloud95.com</a>).<p>I&#x27;ve remember going through quite a few different game engines (Godot, Unity, Defold, etc.) but HaxeFlixel had the most &quot;natural&quot; feel for me to code in, which is largely due to Haxe itself.
评论 #38676691 未加载
pier25超过 1 年前
For years I worked on interactive contents for museums and such. Mostly using Adobe Air (Flash with AS3).<p>At one point around 2014 I was looking for alternatives and tried Haxe with OpenFL. I loved the language but the ecosystem was super fractured. I remember something was breaking on the latest version of OpenFL and the cause was in some intermediary layer to make the whole thing work (Lime IIRC).
loufe超过 1 年前
When I started a gamedev project with some friends last year we considered Haxe against other engines&#x2F;frameworks. Most of us had touched flash&#x2F;actionscript game-making in the past in some way, so it was an interesting choice (less to learn). In the end, Godot easily beat out Haxe given the popularity, which go a long way to making development easier and more fun. I don&#x27;t doubt it&#x27;s mature in its own way, but I think we made the right choice.<p>I&#x27;ve found tons of resources and cool people in the Godot environment that I&#x27;ve worked with. I&#x27;m taking a break on the game to develop new features for an addon we use in-game with the maintainer on things, which is not something you get as often with a more seldomly used platform. All to say, I&#x27;m satisfied with our decision.
nonbirithm超过 1 年前
I used it in conjunction with OpenFL a few months ago to port a Flash project. My impression is Haxe itself is pretty solid as a language but I could only get the web-based target to work consistently. The C++ backend seems dead based on the repo activity[1] and I got GC-related crashes with no workaround. I could never get the native Android support working either since it crashed on startup.<p>Also OpenFL was missing some Flash features the project relied on and I had to spend a lot of time on a fork of their repos patching them in.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;HaxeFoundation&#x2F;hxcpp&#x2F;graphs&#x2F;contributors">https:&#x2F;&#x2F;github.com&#x2F;HaxeFoundation&#x2F;hxcpp&#x2F;graphs&#x2F;contributors</a>
whacked_new超过 1 年前
I used it for a few research projects around the same time. Overall it was a good experience, even after wresting with the macro system, and I was very sad it didn&#x27;t reach wider adoption.<p>A few years later I tried to rebuild an old project running openfl 3.0 and failed miserably. I ended up building a docker running an old base image to get it working. That made me realize that the haxe community toolchain also evolves quickly in a non-compatible way.<p>The TypeScript ecosystem already way too large and way too fast. It&#x27;s hard to follow both. It&#x27;s also harder to find collaborators &#x2F; hires.<p>In a fantasy world a megacorp would pick up haxe as a main driver and pump money into the ecosystem and make lots of people haxers.
wslh超过 1 年前
I ended up using it to play with development around 2013 for writing an algorithm that could be cross compiled to &quot;any programming language&quot; [1]. Really think about Haxe often and like it but have not found a personal necessity to use it again.<p>[1] <a href="http:&#x2F;&#x2F;blog.databigbang.com&#x2F;searching-for-substrings-in-streams-a-slight-modification-of-the-knuth-morris-pratt-algorithm-in-haxe&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;blog.databigbang.com&#x2F;searching-for-substrings-in-stre...</a>
phforms超过 1 年前
Not using it myself, but there is an insanely well done fan-made game called “MegaMan X: Corrupted”[1][2] which uses Haxe for a custom-made game engine. It has been years (and is still) in development and they sometimes live-stream development and game testing on Twitch.<p>- [1] <a href="https:&#x2F;&#x2F;jkbgames.com&#x2F;w&#x2F;index.php&#x2F;MegaMan_X:_Corrupted_Wiki" rel="nofollow noreferrer">https:&#x2F;&#x2F;jkbgames.com&#x2F;w&#x2F;index.php&#x2F;MegaMan_X:_Corrupted_Wiki</a><p>- [2] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;user&#x2F;jkbproductions" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.youtube.com&#x2F;user&#x2F;jkbproductions</a>
subtra3t超过 1 年前
It&#x27;s probably the best way to get into game development if you already have some programming experience (LOVE 2D if you&#x27;re inexperienced). I tried it a while back but when I did the documentation left much to be desired.
presbyterian超过 1 年前
I’ve used it for game dev stuff with HaxeFlixel, but trying to do anything more than that ended up being a pain. The community around it seems to have mostly moved on: a lot of libraries are unsupported or haven’t been updated in years and there’s not a lot of places to find help when you run into problems. I really like Haxe as a language, but I really don’t see a bright future for it personally, especially with how popular TypeScript has become.
k_roy超过 1 年前
I used it for years, but it&#x27;s been a while.<p>I mainly used it because it brought some sanity to the whole Javascript landscape, especially at the time where many frontend libraries were pretty immature.<p>Never really used it for anything because as a Javascript transpiler though.
themerone超过 1 年前
Haxe is a nice language, but it&#x27;s doesn&#x27;t really allow you to deploy any haxe code on any languages runtime.<p>It doesn&#x27;t provide a consistent enough api across all of the language backends. For example, the tink http framework only targets node and php.
donatj超过 1 年前
I poked it a while ago for a project but found some important bits missing for what I was trying to accomplish. It may well be better now, this was over a year ago and maybe closer to two.
CoastalCoder超过 1 年前
<a href="https:&#x2F;&#x2F;haxe.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;haxe.org&#x2F;</a>
demurgos超过 1 年前
I&#x27;m using Haxe actively today to preserve the very reason why Haxe exists.<p>Haxe was created by Nicolas Cannasse, also known as warp. He was a software developer at french game studio Motion-Twin in the 2000&#x27;s. At the time they were producing web games using PHP and Flash. This required some shared logic both in the client and server; which caused some duplication. As any engineer in his situation, he decided to solve this with his own compiler. :D<p>One of the earliest languages he created was Motion Script, a an AS inspired language compiling to the AVM1 bytecode (SWF). You can see some examples in their 2006 game Hammerfest [0]. Haxe is a successor language with the promise of being compatible with many platforms. It&#x27;s pretty remarkable in this way as one of the first languages offering expansive target of multiple _platforms_. Not just CPU architectures or OSes, or languages with a dedicated VM. Haxe was pretty successful, and and all Motion-Twin games since around 2008 used this language. It&#x27;s used even today with their latest releases such as Dead Cells. Warp left Motion-Twin to create his own studio Shiro Games and is also obviously still using his language: Evoland, Northguard, Dune spice wars all use it.<p>From my side, I&#x27;m working on Eternaltwin [1], a project to preserve Motion-Twin&#x27;s web games. Games that were more reliant on the server side were migrated to regular JS; but client heavy games such as Hammerfest, AlphaBounce, their Kadokado games, Fever, etc. use Haxe.<p>We use Haxe as a way to migrate off Flash. In particular, we had many user-made content using Flash. In the last five years, we migrated almost all of it to Haxe while still compiling to Flash 8; and we are now preparing to target HTML5 - but it requires removing all the Flash specific-bits. Doing it in two steps allows to perform the migration incrementally. It also requires use to move to more recent versions of Haxe. Due to the specifics of our project, we&#x27;re stuck using Haxe 3.1 (to target Flash 8), we even sent a few bugfixes to this old version to ensure it keeps compiling today...<p>Regarding Haxe itself, I&#x27;d say that it&#x27;s a very impressive language and probably a very solid choice if you are creating a video game and need to target multiple targets. It&#x27;s good for final applications. However, I feel that it falls short as a language for libraries. It felt very well suited for me to implement schema validation and client libraries. Write them once in Haxe and export for Node, the JVM, Python, PHP, etc. in one go. To support all those targets, it needs to bring its own compat layer that makes it less ergonomic to use Haxe libs from target-native code. It also requires a lot of macros; which tend to be less well supported by editors. Regarding tooling, their package manager improved a lot I feel and now supports project-local dependencies with lock files and they have a nice builtin doc generator.<p>Regarding integration, there are still some slight oddities; like _requiring_ an env variable to find the standard lib.<p>To sum it up; it&#x27;s a pretty nice language, but I feel like it&#x27;s also showing its age (it still feels very attached to older OOP styles found in Java or AS3).<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;motion-twin&#x2F;hammerfest&#x2F;blob&#x2F;master&#x2F;class&#x2F;hammer&#x2F;GameManager.mt">https:&#x2F;&#x2F;github.com&#x2F;motion-twin&#x2F;hammerfest&#x2F;blob&#x2F;master&#x2F;class&#x2F;...</a> [1]: <a href="https:&#x2F;&#x2F;eternaltwin.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;eternaltwin.org&#x2F;</a>
rch超过 1 年前
There was a company in Boulder that was using it, at least a little, as recently as 2019.
larsiusprime超过 1 年前
I use it in game development, it’s nice for those purposes.
bufferoverflow超过 1 年前
It never gained significant popularity. If you want to learn a new language, choose something that is already popular and is gaining popularity. That would be Typescript or Rust at this moment.
评论 #38673524 未加载