Live data from Hacker News

HaXe - Code Once. Deploy Everywhere.

haxe.org

11–20 of 62 posts

Re: HaXe - Code Once. Deploy Everywhere.

#11

Earlier quoted context omitted.

1. While haxe has macros, they're like ocaml macros not like lisp macros. You can write a function that takes an ast and returns an ast, but because the language isn't homoiconic it feels a lot more like working with dom than like macros in lisp. 2. as2 is a superset of javascript, so it also has inline functions. 3. Having worked in haxe quite a bit, I found that the fancy type system got in the way more than it hel…

1. True, but whether or not this is good or bad is subjective. 2. It (AS2 & JS) has functions as a first class type that you can define anywhere, but it does not have inline functions in the commonly accepted C/C++ sense of the definition. Actual inline function support as included in haxe can be hugely important on devices with underpowered CPUs since making a function call has significant overhead in ActionScript w…

As to #2, I think georgemcbay is talking about where the contents of a short function can be copied into the place where it's called (as with the 'inline' keyword in C or C++), thus avoiding the overhead of a function call [1], whereas it sounds like rabidsnail is talking about inner or nested functions, which you can do in JavaScript [2].

[1] http://en.wikipedia.org/wiki/JavaScript#Functional [2] http://en.wikipedia.org/wiki/Inline_function

Re: HaXe - Code Once. Deploy Everywhere.

#12
> Unlike JavaScript which can take hours to debug, haXe has a very strict compile-time type checking feature that allows you to catch errors before testing your program in the browser

It's great that you invented a new programming language. haXe is very cool. But why do you feel the need to disparage other programming languages?

If you personally don't like dynamic typing, that's fine. But putting that in the blurb for haXe will annoy a large potential audience for your language. For what?

Re: HaXe - Code Once. Deploy Everywhere.

#13
post #9

We use HaXe at Justin.tv. It has some very nice points, but "code once, deploy everywhere" is ridiculous. So many of the crucial APIs are platform dependent that there is absolutely no way your HaXe application is going to be portable.

Agreed - my Haxe games run on iPhone, PC, Mac and Flash from the same code base. It's way less work than it would be rewriting them, but it's certainly not a panacea. However, the NME project ( http://code.google.com/p/nekonme/ ) is getting pretty good; it emulates the Flash APIs on other platforms. Great for games; probably not usable for the kinds of stuff you do at Justin.tv.

I should mention too that if anyone's interested in Haxe and would like to talk to me for a few minutes about my experience porting the games at http://www.bigblockgames.com and the feasibility of swapping to it from your current solution, hit me up at michael@bigblockgames.com.

I don't do contract or consulting work, so you don't have to worry about me trying to sell you something. :)

Re: HaXe - Code Once. Deploy Everywhere.

#14
post #3

I really hope, HaXe gets a JVM compile target one day. In my opinion that would make it a perfect language for writing libraries for a large number of problems for a big audience.

http://haxe.org/doc/intro says "C# and Java targets are coming soon!", and links to the following tweet: http://twitter.com/cwaneck/status/15486381623091200, which is dated 16. December 2010.

In other words, I wouldn't get my hopes up :/

Re: HaXe - Code Once. Deploy Everywhere.

#16
post #9

We use HaXe at Justin.tv. It has some very nice points, but "code once, deploy everywhere" is ridiculous. So many of the crucial APIs are platform dependent that there is absolutely no way your HaXe application is going to be portable.

Who knows - if they keep pushing, it might eventually become true.

I remember at one point being part of the crowd that laughed at "Write once, run anywhere" slogan that Sun used for Java ("Write once, debug everywhere" was the joke back then). If you look at how things stand today, however, it has become mostly true (for server side applications).

Re: HaXe - Code Once. Deploy Everywhere.

#17
post #9

We use HaXe at Justin.tv. It has some very nice points, but "code once, deploy everywhere" is ridiculous. So many of the crucial APIs are platform dependent that there is absolutely no way your HaXe application is going to be portable.

I would be interested to know how and why you use it, and what you consider it's nice points to be (if you care to share that is).

Re: HaXe - Code Once. Deploy Everywhere.

#18

I became a huge fan of haxe when I was working at chumby industries and was limited by the firmware to working on AVM1/ActionScript 2 projects. haxe allowed me to use a much more modern language with far better features (eg. compile time macros, inline functions) than AS2 allowed even while hitting the same VM. It is a really fantastic language for many different platforms and I definitely recommend checking it out.

1. While haxe has macros, they're like ocaml macros not like lisp macros. You can write a function that takes an ast and returns an ast, but because the language isn't homoiconic it feels a lot more like working with dom than like macros in lisp. 2. as2 is a superset of javascript, so it also has inline functions. 3. Having worked in haxe quite a bit, I found that the fancy type system got in the way more than it hel…

4. I have worked with haxe quite a bit and I haven't seen this; after a while you create enough libs for yourself to avoid this. Or maybe i'm missing the point here; what kind of host-specific features are you talking about? Maybe you are creating totally different software from what I am making :)

Re: HaXe - Code Once. Deploy Everywhere.

#19

Earlier quoted context omitted.

Agreed - my Haxe games run on iPhone, PC, Mac and Flash from the same code base. It's way less work than it would be rewriting them, but it's certainly not a panacea. However, the NME project ( http://code.google.com/p/nekonme/ ) is getting pretty good; it emulates the Flash APIs on other platforms. Great for games; probably not usable for the kinds of stuff you do at Justin.tv.

I should mention too that if anyone's interested in Haxe and would like to talk to me for a few minutes about my experience porting the games at http://www.bigblockgames.com and the feasibility of swapping to it from your current solution, hit me up at michael@bigblockgames.com. I don't do contract or consulting work, so you don't have to worry about me trying to sell you something. :)

Would you be so kind as to post that experience here?

Re: HaXe - Code Once. Deploy Everywhere.

#20
post #9

We use HaXe at Justin.tv. It has some very nice points, but "code once, deploy everywhere" is ridiculous. So many of the crucial APIs are platform dependent that there is absolutely no way your HaXe application is going to be portable.

What did you think about the Haxe toolchain, and how does it interact with other components of more standard web stacks? In fact, a blog post on how Haxe is used at a large production site would potentially be useful for you, if only for the SEO to attract Haxe hackers.
Post reply on HN