View Full Version : Does anyone else think haXe is kind of pointless?
mattkenefick
10-28-2008, 08:15 PM
You can't do 3D in PHP. You can't do cURL in Flash. You can't do server-side with Javascript without a PHP file.
So why are we combining all these into a "single language" if most of the methods are different anyway?
For sake of array functions and such? I don't really think its a big deal to know that PHP has array_push versus Array.push();
Is there really a point for this ?
ianxm
10-28-2008, 08:28 PM
the target platforms don't entirely overlap, but there is a lot of overlap in programs written for these platforms. haxe offers a small standard library that you can use on all targets, while allowing the use of the full library specific to that platform.
mattkenefick
10-28-2008, 10:09 PM
I know they don't overlap entirely... But I feel that this haXe deal is a big waste of efforts. It's just adding another layer.
Having a standardized Math or XML library isn't really killing me when I program.
Standardizing Math.sin(); and sin(); isn't helpful...
I just fail to see the actual benefit.. Have I not read deep enough into it?
haXe is not a commercial transient programming language and does not reinvent components for commercial cycles.
have you seen 3d sandy running on an iphone in javascript.. and in the future in silverlight on your blackbury?
Did you want flash interactive control on any platform?
Do you want your logic to be running in the right place or should company politics put it in the wrong place and have 3 hackers rather than one.
mattkenefick
10-29-2008, 02:50 PM
haXe is not a commercial transient programming language and does not reinvent components for commercial cycles.
have you seen 3d sandy running on an iphone in javascript.. and in the future in silverlight on your blackbury?
Did you want flash interactive control on any platform?
Do you want your logic to be running in the right place or should company politics put it in the wrong place and have 3 hackers rather than one.
I try not to associate myself with the iPhone. :confused:
I'm not sure what the rest of this has to do with using haXe. Logic running in the right place has what to do with company politics and programmers?
Macromedia Generator is a good example of a powerful flash technology that disappeared over night, that is the reality of Commercial languages they don't evolve they reinvent themselves from scratch. Look at how Basic has evolved against opensource language like Ruby or Python. How much of your AS2 code do you use recode for AS3, what a waste of energy? FLEX or XAML do either have a long term future? Languages tend to have problem domains, haXe is designed for the web, but I can see it spreading.
Recently I read about a haxe physics engine being compiled as C++, this and screenweaverHX seem far better approaches than 'air'. Why limit your code to one arena, flash is good at rapid interfaces development but if haxe is fairly interchangeable then you can spruce up desktop apps.
Better programming languages make it easier to produce less, more efficient and maintainable code in less time, if this was not true why would anyone ever use Ruby? I looked at PHP it's a mess of a language why would I learn that when I can create complex PHP applications from haXe applying my actionscript skills and maybe even some functional programming concepts.
My experience is that, as a Flash developer I have had to process data that should be provided in a suitable format. Java programmers getting us to scrap html and pass it through via flashvars, meh, if we all coded the same language it would be so much easier to get sense out of them and there would never be a 'serious' coder and actionscripter attitude split, with a single language you can have better communication between sections and organisation of the system as a single application, with MVC structures crossing traditionally separate parts.
Using one language means that ideas used in one target are now considered in other targets.
Client asks for a flash game you code it in haXe, and you compile several versions for different flash players the user runs game, "You have an old flash player, upgrade if you want game to run smoother".
Client gets a state of the art flash game but with large player matrix, I think the term is degrading gracefully.
I don't see a reason not to use Flash IDE for graphics, but haXe seems to have more milage than actionscript. I am unsure if it would always be
the best choice for php and javascript though
grumpytoad
11-18-2008, 10:14 PM
I'm not sure what the rest of this has to do with using haXe. Logic running in the right place has what to do with company politics and programmers?
The direction of development for a language is often influenced by politics, just look at Java or C#.
HaXe has some benefits over the other languages: stricter typing allows for less bugs and better structures, plus free documentation.
If you run the haXe PHP target, you can start with a cheap hosting company.. Once you start getting traffic and developers you can switch to the faster neko target, and put the data-crunching parts as a CPP target, with little to no development overhead.
You can make more optimisation on the haxe flash target than the AS3 target, due to native Integers and fast iterative classes (like haxe.FastList), and since ES4 is scrapped, you'll be waiting a while for a robust type system on javascript.
So get cracking on some code, you won't turn back.
Haxe has the Alchemy bytecodes so can potentially run faster than normally created flash, every day it gets more points!
I have been using/learning haxe.. and I am now beginning to think the question should really be:
Does anyone else think coding AS3 is kind of pointless?
I mean its not a big leap to haXe from AS3 and probably not from AS2 if your just working with flash. So if you divorce graphics and code I do not see the advantage of AS3 apart from the larger user base.
For instance if I load a movie into the same ApplicationDomain I can create a new instances from the loaded movie by its name and cast it to MovieClip
var mc: MovieClip = cast( Type.createInstance( Type.resolveClass( nom ), new Array() ), MovieClip);
Notice the use of the generic 'Type' class, now this looks messy, but doing this in AS3 is more messy, but in AS3 I have to use flash specific and less logical constructs, my mind is constrained to think always in flash terms, haxe allows me to think more in terms of general code and not get too caught up in code that will be useless in flash 11! It also helps me see areas of flash that are ugly and I can package them so that I can work in more general platform unspecific terms.
Haxe also has interesting lightweight structures that allow for cases that are marginal for class such as typeDef and enum.
I understand why you might consider using flex but AS3... can't really see it, haxe just opens up so many more future options. I am working on some work flows, soon I will put together a tutorial that may help you with switching to haxe.
kkbbcute
04-14-2009, 10:41 AM
Pointless? Not really.
Is haXe sort of dead? Very much, just look at the number of people viewing this forum. ;)
Oh, it is far from dead. You just cant expect the same kind of exposure that Adobe permits itself with regard to their products. Read about on the Internet, they have a multitude of amazing projects done with haXe which would be ABSOLUTELY impossible with anything else. Not to mention it is lightyears faster than either Flex compiler or the performance it produces.
The problem with haXe is that Nicolas is really lazy with documentation, because he occupies himself with other things, so haXe documentation looks like something written by hardcore assembly programmers for hardcore assembly programmers. Which is a pity. In fact Nicolas admits himself he should have done more about documentation, which was the reason he made a Wiki instead, sort of offloading the responsibility to those who can find time wikying the pages instead of him.
But haXe lives on, because there is use for it. It fills a gap which Adobe does not even care about, because they live in the clouds. We just get leftovers from the cloud they are sitting on, and whatever is cooking in their labs, for all its marvel, seldom ends up in our hands, and when it does they are quick to ask us to pay up thousands of dollars for it.
The future is a multitude of small tools right for the job - IDE, syntax checker, preprocessor, compiler, debugger, virtual machine, graphic designer etc. Not the juggernauts of applications that Adobe burps out - consuming hundreds of megabytes of memory doing nothing. People use them yes, but they complain. They complain and continue to use them. Not everybody can just switch, because Flash IDE is not THAT bad, it is just bad enough. And you can bet when Adobe updates their portfolio, they automatically add up resource usage to their apps, because they know this is what sells the hardware, which is what they hope for.
Yeah, and I forgot to say that the post count on this board has VERY LITTLE to do with whatever state of things haXe is in. For obvious reasons to all willing to spend a minute thinking about it.
scottc
04-21-2009, 03:29 PM
IMO haXe is growing (and gaining a lot of momentum).
The post count may be small, however the views are pretty epic. Due to the fact that many people are wanting to learn it but do not know enough to post about it?:confused:
I made an account here because no one else had a haxe forum.. kudos to actionscript.org
I think haXe is just too scary for most people..
- It's reletively new language, with not many learning resources avaiable (tutorials etc)
- Website developers don't need to compile php or javascript, so using a compiler can be scary for them.
- Choices of IDE's... Flash Develop, Eclipse with hxdt... (only 2?)
- The name "haXe" is scary in it self... "actionscript" sounds more beginner friendly.
- One compiler and langauge for multiple platforms?! *scary!*
- It's hard to convince clients and employers to let you use haXe, because it seems to "experimental", and isn't backed up by a big company like M$ or adobe.
- and the already mentioned cryptic documentation.
Dispite the "scary" things above, haXe is a really awesome language and is worth taking the time to at least try it to see what it has to offer.
Most of those scary things, are acutally good... or can be worked around.
- Can compile as3 source code, to keep clients and employers happy.
- haXe can use the same classes that are in as3. (the code looks identical almost.)
- haXe already has many great as3 libaries(like physaxe), or can be easily ported to haXe from as3.
- Most as3 developers have already mostly abandoned the Flash IDE and edit their .as files in a text editor or Flash Develop(so should feel almost at home with haXe).
- Only need to learn one langauge that can compile into many things, also saves writing code many times... write classes that can be used in multiple platforms.
- Does a great job at compiling, and is often more optimised compaired to if you wrote it for the original platform.
- Not being a commercial product by m$ or adobe is a good thing, it means that it's future is dictated by the whole community and not by a company and is available on more platforms such as GNU/linux. When was open source a bad thing?(ADDED)
Personally i'm actually going to drop all my as3/php/js code in favor of haXe, the language and compiler is just too irresistible. I'm in the process of learning haxe and updating my php website and flash games to haxe. :eek:
(The only real problem with haxe is you get greedy and want this wonderful language to do everything for you, c++, java, prepare food, clean the house...)
Technology never wins that's what people need to understand. No matter how cool a technology is, people have to like it and use it to make it successful or else it just will end up dead. So people win always, technology never. Blue ray is extremely cool for example but will it win? maybe, people will decide like they did when the first CD came out. That was the worse of all technology available but people decided that was what they wanted so it won, period. Same thing is happening to Haxe in my opinion, people have decided it will not win and so it won't.
Technology never wins that's what people need to understand. ... Same thing is happening to Haxe in my opinion, people have decided it will not win and so it won't.
'Never' is incorrect word here. Technology DOES win when the constraints it breaks are favourable - such as when the speed of computation it permits make things possible which other technologies could not. C++ did not gain ground at first because C compilers produced much more efficient code, and the computers of those days had to squeeze all they could to make powerful software and good games possible. Also, one of the more successful games of its time - Quake, to give ONE example, would absolutely not be possible without the hardcore assembly knowledge put into it by its makers.
haXe or its successor will slowly gain ground because Adobe is LAZY. Thats one word describing them perfectly. They live in their own little world of "rich internet applications from creative corporate vendors built by industry's leading creative artists" which means anyone not employed at a company who can afford all the portfolio they need to make an SWF, are out of luck. Despite the obvious fact that according to Adobe themselves Flash Player has penetrated 97% of Internet clients.
I, on the other hand, manage to produce SWFs with Linux, and they look just fine. Not thanks to Adobe though. Thanks to all those people who stubbornly make it possible.
This might open your eyes:
http://www.youtube.com/watch?v=AZnYRaQfjK4
yell0wdart
04-21-2009, 08:57 PM
This might open your eyes:
http://www.youtube.com/watch?v=AZnYRaQfjK4
Seth Godin is the man. Nice link. :)
kkbbcute
04-22-2009, 06:27 AM
I don't think it's scary, it's just that most people can't be bothered to learn it as they see no good reason to.
This might open your eyes:
http://www.youtube.com/watch?v=AZnYRaQfjK4
Thanks, but it did not. What was your intention again?
Thanks, but it did not. What was your intention again?technology doesn't win, that's the point. So no matter how cool you think Haxe is, it's not enough to make it a success.
kkbbcute
04-22-2009, 03:18 PM
So what you're trying to say is, HaXe isn't a great big lively community, or in other words, HaXe is dead. :p
So what you're trying to say is, HaXe isn't a great big lively community, or in other words, HaXe is dead. :p
No that's not what I try to say. I'm just pointing out that no matter how great, cool, amazing a technology could be (and maybe Haxe is), it's not enough to make it a success. And in the case of Haxe it seems that it didn't make it. But maybe I'm wrong.
kkbbcute
04-22-2009, 03:32 PM
And in the case of Haxe it seems that it didn't make it.
So if by "it didn't make it" you did not mean that haXe is dead, then what did you mean?
English being a second language for me it's possible that I'm missing some semantic principles but still I do think that "it seems that it didn't make it" is not the same as "haXe is dead". Maybe I'm wrong.
yell0wdart
04-22-2009, 04:02 PM
He means that haXe doesn't solve a problem that most people have. Most people don't have a programming language problem. Most developers don't wake up in the morning and say "if I only had a programming language that would allow me to write software...".
To put it more plainly, if I need to write some PHP, then I'll write my PHP in PHP. If I need to write some AS, then I'll do it in AS3. Don't get me wrong, I think haXe is a really innovative concept, but I don't think it solves a major problem for most developers.
haXe isn't dead because there's a whole (apparently thriving) community of developers behind it. The point is (if you listened to Seth Godin's presentation in the video), a product alone (no matter how good it is) won't succeed unless it solves a major problem that causes the masses to get fired up about it.
kkbbcute
04-22-2009, 04:11 PM
haXe isn't dead because there's a whole (apparently thriving) community of developers behind it. The point is (if you listened to Seth Godin's presentation in the video), a product alone (no matter how good it is) won't succeed unless it solves a major problem that causes the masses to get fired up about it.
If it's not succeeding like the guy in the video and you said, in a capitalist sense, its dead, isn't it?
Totally agree, Haxe can still succeed, who knows? Or maybe it will never and here again who knows, certainly not me!
Totally agree -> with yell0wdart
yell0wdart
04-22-2009, 04:14 PM
If it's not succeeding like the guy in the video and you said, in a capitalist sense, its dead, isn't it?
In the practical sense, as there are many developers using it (apparently), I think "dead" might be a bit premature. Maybe "on life support" might be a more fitting term. :)
kkbbcute
04-22-2009, 04:16 PM
In the practical sense, as there are many developers using it (apparently), I think "dead" might be a bit premature. Maybe "on life support" might be a more fitting term. :)
Oh yeah, speaking of which, do you guys know of any great haXe communities in which I can start off from? :)
maskedMan
04-22-2009, 04:32 PM
If it's not succeeding like the guy in the video and you said, in a capitalist sense, its dead, isn't it?
Only in the sense that, for example, XMLHttpRequest was 'dead' for nearly a decade until someone decided to bundle it up with a bunch of other functionality and call it "AJAX".
Maybe in 5 years haXe will no longer be 'dead' like AJAX . Then 20 years later, people may be calling it 'dead' again the way people call COBOL 'dead', even though a COBOL programmer will probably have no trouble finding a (really well paying) job.
kkbbcute
04-23-2009, 10:57 AM
Only in the sense that, for example, XMLHttpRequest was 'dead' for nearly a decade until someone decided to bundle it up with a bunch of other functionality and call it "AJAX".
Maybe in 5 years haXe will no longer be 'dead' like AJAX . Then 20 years later, people may be calling it 'dead' again the way people call COBOL 'dead', even though a COBOL programmer will probably have no trouble finding a (really well paying) job.
But if you want to base it off future possibilities, then nothing is ever "dead". We can't base an evaluation of something on what is might be in the future, we grade it based on what it is now. Although I do agree with you that things might change in the future.
scottc
04-23-2009, 01:02 PM
I don't think it's scary, it's just that most people can't be bothered to learn it as they see no good reason to.
I see plenty of good reasons to use it... however i think they are just hung up on the imaginary cons.
Pros:
"While most of the other languages are bound to their own platform (Java to the JVM, C# to .Net, ActionScript to the Flash Player), haXe is a multiplatform language."
"haXe offers very good performance and language features to develop Flash content."
"A high level strictly-typed language such as haXe while keeping full compatibility with your existing server platform and libraries."
"You can compile a haXe program to NekoVM bytecode. This can be used for server-side programming such as dynamic webpages (using mod_neko for Apache) and also for commandline or desktop applications, since the NekoVM can be embedded and extended with some other DLL."
"platform-specific libraries : the full APIs for a given platform are accessible from haXe"
Nice video by the way, have you seen mybrute (http://ncannasse.fr/blog/fight_my_brute) yet? I'ld call it very successful marketing.
I can agree that most folks have no reason to use haXe, because first, it always takes energy to switch and learn, so there needs to be a benefit from the start already, for the effect to be positive. Second, haXe is not THAT different from ActionScript 3, in that sense that it offers much the same facilities, granted with many optimizations and innovations, but for those that do not use its features, it is all the same. Which is kind of the point of "technology does not win".
But for me there is a definite reason to use haXe, because I type code fast and accumulate lines of code fast too, so I naturally seek languages that let me do most with fewest lines of code AND with maximum performance, because most of the stuff I do tends to kneel the Flash Player if not done right. For me haXe works, because the features it provides give me speed advantage, plus much of the same facilities reduce the code line count and produce same logic. Its a natural evolution for me.
The drawbacks are the bad documentation and much too swift design, i.e. it could have taken its time to design the language a bit better. For instance you have "type parameters" (think C++ templates), but these only apply to 'class' type. Why these cannot parametrize function argument types, I do not know, but it seems not designed as properly as a language usually should be. Anyways, thats a whole another discussion.
yell0wdart
04-23-2009, 10:52 PM
I'ld call it very successful marketing.
To call it successful would sound presumptuous unless you have hard #'s to back it up. Clever? Maybe, depending on how much you like anime/manga. Successful? Can we see some numbers please? ;)
scottc
04-24-2009, 06:28 AM
To call it successful would sound presumptuous unless you have hard #'s to back it up. Clever? Maybe, depending on how much you like anime/manga. Successful? Can we see some numbers please? ;)
"In just four days, we have been jumping from 0 to 200.000 unique visitors !" as per the link i posted...
yell0wdart
04-24-2009, 07:21 AM
"In just four days, we have been jumping from 0 to 200.000 unique visitors !" as per the link i posted...
Not too shabby. :)
scottc
04-24-2009, 10:16 AM
Not too shabby. :)
However don't misinterpret the data, it's the mybrute website not the haXe website...
However at the bottom of the page you can see "HAXE POWERED"... it shows that haXe is a completely viable/profitable website solution.
However it makes you wonder why the website got so many unique visitors and would it have been as successful if it wasn't made in haxe?
yell0wdart
04-24-2009, 05:17 PM
Valid questions, I think. How does that particular promotional website compare to other efforts you've done?
I think the "HAXE POWERED" at the bottom is only really neat if you're aware of what haXe is and what it can do. This kind of gets back to that video from Seth Godin's speach. The point he makes with that graphic that says "Nobody cares about you". He touches on the "so what" factor. To the average visitor (assuming they're not a developer, and have not heard of haXe), how is the fact that the site was built using haXe benefitting them at all? Why should they care? Why should a client care if you're building them a site in haXe? How does that benefit a client over traditional AS/LAMP setup? The answers to questions like that are what will determine the overall success of haXe in the short term.
Long term is another question. maskedMan already pointed out AJAX. I'll throw Ruby on Rails out there too. Ruby's been around for a LONG time. It was just another language to overlook until Rails came about and offered some truly valuable library options that made attractive to front-end developers. I think haXe will need to solve a bigger problem for a broader group of developers before it really gains a lot of steam.
from 0 to 200000 in one day seems quite a lot. I won't be surprised if this number was threw out by the owner(s) of the site ... anyways, seeing Haxe powered on a website would most likely not bring anything to the Haxe development community because I never saw anything graphically special with Haxe based application. So if what you see has nothing special and its haxe powered then who cares?
kkbbcute
04-25-2009, 06:02 AM
Long term is another question. maskedMan already pointed out AJAX. I'll throw Ruby on Rails out there too. Ruby's been around for a LONG time. It was just another language to overlook until Rails came about and offered some truly valuable library options that made attractive to front-end developers. I think haXe will need to solve a bigger problem for a broader group of developers before it really gains a lot of steam.
I think the main problem here is that they need to create something new and unique that is actually worth the time learning a new language to do. It's really not that haXe is useless, but rather, it's just that most people see no real reason to use it without explicit and great benefits to their project that would justify the learning curve.
papa_pasta
10-29-2009, 11:59 PM
For me the main problem is not the syntax of a language, but rather the algorithms and how things work. Syntax itself is just a matter of habit and practice.
Could you elaborate on "how things work" and "the algorithms"?
Algorithms are programmers responsibility, not compilers.
How things work are supposed to be abstract. I.e. not really explained to the programmer by the compiler, otherwise the compiler would not be able to evolve, IMO.
fanjules
11-15-2009, 07:45 AM
Speaking as a potential user of haxe. I looked into it. Sounded useful, but didn't sound high performance. How could a language that "fits all" possibly be as efficient as code wrote in the original native language? That I deemed, was impossible. So I quickly forgot about it.
Then I came across this:
http://webr3.org/blog/haxe/flash-10-massive-amounts-of-3d-particles-with-haxe/
That opened my eyes a lot. Though it wasn't entirely black and white, not by a long shot. The original pixelbender version of the code was slower than the haxe version. Then I saw this, which was a pure AS3 version:
http://blog.joa-ebert.com/2009/04/03/massive-amounts-of-3d-particles-without-alchemy-and-pixelbender/
Which was alleged to be almost-but-not-quite as fast as the haxe version. But many users, including myself found the AS3 version quicker. Perhaps I'm putting too much emphasis on performance, but at the moment with my current project (and probably most of my future ones) I'm squeezing as much speed as I can out of the flash player.
One cool trick of haxe is that I can use flashdevelop which rocks. So moving to haxe might not be too difficult at all. But in the end I stuck with pure AS3 (for now). Stuff that scares me about haxe is the lack of docs and the stability of the platform without a big name behind it. When I start hearing about individual developer names on the project I fear what might happen if that individual might leave the project. I'm also a little unsure as a language how buggy it is. A lot of the misgivings come down to a lack of information really. Partly down to the developers, partly down to the smaller userbase.
On a more positive note, I like to think haxe is on the up, and that the current users are "early adopters" that will iron out any problems so that in a few years time it will be a really appealing platform to develop on.
Barna Biro
11-15-2009, 10:48 AM
haXe is like Linux... there will be people who'll use haXe just to "feel more special" than others but haXe will still be in the shadow and sooner or later it will fade away. It really does not bring anything special or actually useful that would make us really want to use it... it's just "another language" and it honestly looks bad... to me, it's like looking at a pile of junk that promises to do 100000 things but it can't even do 1 thing better than any of it's competitors ( like a swiss knife ).
If someone really wants to learn and do programming then he/she should pick up a "real language" ( like C, C++, Java or C#, even AS 3.0 ) and once he is more than proeficient with that language ( which will take some time ) then he can waste his free time if wants to with languages like haXe...
You have no idea what you are missing.
Even if speed wasn't your concern, and haXe CAN help you produce code that is orders of magnitude faster than its fastest AS3 equivalent because of the compiler differences, there are still features in haXe that I, as a longer-term "haXer" can no longer live without, considering AS3 a "toy language" at best.
Before I tell you more, let me ask you how much do you know about compilers and computer science? Have you heard about LLVM? Many folks including myself could not understand how is it that the code disassembled into a very low lever instruction level, and then assembled into a higher level, can be faster than a lot of its alternatives? F.e. Adobe Alchemy, the experimental Adobe C to SWF compiler built using a LLVM backend, is capable of some things you can never do with ActionScript 3. F.e. DOOM was ported to Flash Player using Alchemy.
Why am I telling this? Well you are wondering how haXe can be effective producing SWFs while at the same time targeting so many platforms? Good point, but you have to account for the fact that first it is written in a language designed to write compilers - ML (rather, its more modern incarnation - OCAML), which has repeatedly shown to yield more "strict" code - i.e. the compilers it produces have less errors, and so more time can be spent concentrating on other important things - namely faster runtime code produced by these compilers. Which haXe IMO excels at.
There are several examples on the web where disassembled AS3-produced SWF contains extra unneeded instructions. This is yet to be the case with haXe. In short, it is my opinion it is simply a much better compiler, and that is not an easy thing to do, especially for a 1 french guy still studying compilers. But the fact of the matter is, amazingly it works, and works quite well indeed, certainly well enough to ask yourself "How can not a whole team of compiler engineers at Adobe do something better?".
Now, to the factors NOT having to do with speed:
1. Do you know what "type inference" is? Many who don't, don't know what they are missing. Consider that in ActionScript 3 you have to type:
var i: int = 1;
That gives you a strictly typed int variable. When writing big projects, you get a bit tired of telling a stupid compiler what type of variables you want on a case by case basis, when clearly you can see that some things it should figure for itself, like, in the above:
var i = 1;
Obviously, any person would conclude that i is an int, without having to spell out its type to compiler. This does not work as intended in ActionScript 3. At best you get an "untyped" variable - meaning that its type is never checked, and it probably is an "Object".
In haXe however, the compiler does a very good job with you omitting types, even for function return types, and STILL keeps type checking:
function f(n)
{
return Math.floor(n)
}
This is the same in haXe as typing:
function(n: float): int
{
return Math.floor(n)
}
And you don't loose anything beside the control freak side of yours.
Basically, you spent less time typing in haXe, and more time designing your application.
There are other things like inline functions, type parameters and typedefs, all of which I find IMMENSELY useful, but it is all best covered elsewhere, f.e. at haxe.org.
Don't judge a compiler by a single particle demo demonstration, even though it excels at it obviously. When your project is 10000 lines of code, you start to appreciate all the small things it gives you almost or entirely for free.
Barna Biro
11-15-2009, 11:25 AM
> Masters degree in Software Engineering... Does that answer your question?
I do agree that the Adobe compiler could be much, much better but I don't think that everything comes down to the compiler... The compiler has been even worse the past years and not many ( if any people ) whined about it. Why? Because 90% of the people using the technology don't actually come from a programming background and until they get the job done, they're cool... Why is this important? It's important because you are trying to convince people with no serious programming experience or background, that "just because you might end up with a faster compiler, you should use it!" ( they might not even know what that is, nor might they care... so you are quite missing your target here ).
Regarding type reference... No offense but this affirmation "When writing big projects, you get a bit tired of telling a stupid compiler what type of variables you want on a case by case basis" clearly points out that you are not a senior developer yourself... if that's how you feel ( "tired" ) and you consider that having untyped code is "wow!" then that's just sad... rather than feeling euphoric because of some cheap features, people should instead learn how to program correctly. If people "feel tired to type they variables correctly and write correct code" then maybe, those people should never be put to work on more complex projects... if they "get tired" so fast, then they should be kept at creating banners and more "non-complex" things and be payed for 300-400 Euro / month ( don't get me wrong... 300-400 might not be bad for some, but if they prefer to be lazy than write correct code... well, that's their problem ).
Basically, you spent less time typing in haXe, and more time designing your application.
This is purely subjective. I'll bet that I can write code faster in Notepad without any code-hinting than the large majority of people around here... and not only faster, but better and more efficient code. You're point is totally invalid...
So, to conclude: people should use haXe just because an advanced "user" can somewhat outperform others compiler-wise? And because it lets people write untyped code? Thanks, but no thanks...
PS:
Don't judge a compiler by a single particle demo demonstration, even though it excels at it obviously. When your project is 10000 lines of code, you start to appreciate all the small things it gives you almost or entirely for free.
Judging an application by lines of code is just as bad... lines of code have nothing to do with the stuff we were discussing here. You can have an application of 10 lines of code and be N times worse than an application of 1000000 tines of code. I do agree that "good tools can help in many situations" just that I don't see haXe as being such a "great tool"... and well, if "money is an issue" that's again, a problem I personally don't consider... If a company wants to get a job done correctly then it MUST invest into it's tools... no matter how great the "free stuff" might seem to be, the payed things are generally better ( exceptions do exists... but still ).
wvxvw
11-15-2009, 12:37 PM
Sorry, to chop in :)
@Barna Biro
You had really misunderstood what Amn said about typing. The compiler processes the files differently, so, undeclared type in HaXe is not the same as * type in AS3. In fact HaXe is much more strict in terms of types, and to get the functionality of AS3 * type you will have to specify that explicitly, else the type will be defined by the first occurrence of that variable's value (i.e. when you set it first time). This is arguably a good thing to write the code without specifying the type and relying on compiler to pick the proper type for you... But, the point of the demonstration was to show you that even a variable without type specified at design time will be strictly typed.
If you will take time to look into HaXe language API you will find a lot of interesting things that are non existent in AS3 and are sorely missing. What "bought" me personally ware true generics :) (Not like Vector.<T> in AS3, but real generics, where you may specify type on interface methods, create rules for types etc, well, just like in C# or Java).
Next - enums and typed hash tables (dictionaries). Enums are simply non-existent in AS3 and the few variants of hash tables are way to little and to multifunctional for normal work...
So, to conclude: people should use HaXe just because an advanced "user" can somewhat outperform others compiler-wise? And because it lets people write untyped code? Thanks, but no thanks...
No, absolutely not. I see HaXe as a language that let's me do some stuff that is not possible in AS3, but is possible to execute in AVMPlus... just another tool to write for Flash Player, which has benefits and disadvantages, but, no one restricts me from using the advantages of AS3 AND HaXe together.
PS. Actually, the way you compare HaXe to Linux makes sense in that though Linux remains a somewhat "underground" technology it is a source for ideas for other OSes, and it is hard to believe it will became extinct because other OSes need this kind of competitor :)
PPS. PHP was written by a student learning computer science ;)
fanjules
11-15-2009, 12:44 PM
An interesting post amn. I'm not sure I agree at all with your argument that haxes untyped abilities are brilliant, they look like it's more easy to slip up and write slow code. Perhaps in practice that is not the case.
When you wrote "especially for a 1 french guy still studying compilers" I nearly died. Is that the core of haxe's development team? It's hard for somebody investing a lot of money into a project to adopt haxe if it's future rests on individuals like that. For this reason, at the moment I could only recommend haxe for casual or hobby projects.
The performance gains of haxe are not black and white from what I've seen so far, though haxe doesn't seem marketed as such so I'm not going to dwell on that. It seems the pro-haxe guys push that more than the haxe developers do. Certainly in theory the other advantages of haxe are very clear so I look forward to the coming years and what happens with Alchemy, Actionscript, HaXe, etc.
Barna Biro
11-15-2009, 12:57 PM
Thanks for clearing out the typing thing... I did misunderstand what Amn meant, but I still think that this haXe feature could bring much more bad then good.
I do feel you on generics and enums but I'm a bit "harder to buy" :) It is true that haXe has additional things that AS 3.0 doesn't, mainly because it's mixing things with C++ but I somewhat feel that people tend to make too much fuzz about features that are indeed handy in some situations but are not exactly the things people can't live without ( the best example is exactly AS 3.0 ).
In the end, you're right... haXe is just another tool and people should choose their tools so that the chosen tool fits their needs the way they want it to fit. Since we are all working on different things, we have different needs so I can totally understand that choosing haXe in certain situations might be better.
The haXe vs AS 3.0 "war" in essence is starting to look like the FDT vs Flex Builder war. There will be people stating that FDT ( or FD ) is way better than Flex Builder but there will be others who swear on Flex Builder... it's quite an endless "fight".
* Still sees haXe going down in dust sooner or later * :)
EDIT:
PPS. PHP was written by a student learning computer science
I honestly hate PHP. :) The only good thing that ever happened to PHP is Zend but even with Zend, PHP is still PHP and I don't think too much of it.
wvxvw
11-15-2009, 01:41 PM
Oh, one more thing I forgot to mention: HaXe has sort of delegates (C#) i.e. it lets you define the function's signature when it is passed as an argument. I.e. something like this:
This is an actual signature for Array.sort():
function sort(f:T->T->Int) { ... }
Will describe the function passed as an argument as such that has 2 mandatory arguments of type T (the one that was specified when creating an instance from template) and returns Int. Now think of that actually event handlers in AS3 must have this, all Array / Vector methods that need a function as an argument need this. XML's setNotifications needs this, and these are only the built-in classes!
Another thing is Type.createInstance() and Type.createEmptyInstance(). Since, as you know it is not possible to apply() the constructor in AS3, this helps a lot.
So, IMO HaXe lets you write more error-safe code. The speed increase is just a side effect :)
Well, if you ask me, I believe that HaXe is not unnoticed by Adobe :) And will hopefully lead to that AS will be improved as a language.
Barna Biro
11-15-2009, 02:03 PM
Well, if you ask me, I believe that HaXe is not unnoticed by Adobe And will hopefully lead to that AS will be improved as a language.
I would expect Adobe to improve the language no matter what haXe or any other language, technologies does. I'm a bit disappointed about Flex 4... To me, Adobe creates the impression that they are more focused on trying to make their stuff "shiny" instead of actually improving things. I don't want to start a debate here because I know that it won't lead to anything good, nor will it matter... all that I'm saying is that I don't feel that Adobe is taking their stuff seriously... there are some features in Flex 4 that are welcome and ok but the compiler still is slow as hell, there are still many problems that could have been fixed ( small things... max 1-2 weeks of work ) but none of that happened...
So, even if haXe or whatever else falls of a cliff tomorrow, Adobe should still put effort into improving AS and the technology as a whole... better said, they should start putting effort into the things that really matter for a developer and less into "fancy" features that are definitely appealing to beginners and definitely help sell better ( in the end "money talks" ) but on the long run, I think that people will get tired of waiting for actual improvements and they might be tempted to switch to a different platform.
So, IMO HaXe lets you write more error-safe code.
This again is arguable. I don't believe that error-safe code should be coupled with a technology or IDE or whatever. In the end, it's not the IDE that is writing the code but us. If people learn to write correct code, it will be correct no matter the technology, the IDE or whatever... just as "error-safe" code can be written in any language if you understand how the technology you are using works and most importantly, you understand what you are doing. :)
Just my 2 cents and yes, I do agree that AS is far from perfect. :D
fanjules
11-15-2009, 03:20 PM
Stuff like Silverlight probably concern Adobe more.
They're not bothered if HaXe makes better SWFs than their own language, they are bothered if people start switching to something like Silverlight if it's offering C++ style performance in a browser.
These are the sort of "threats" that will make Adobe give Flash and Actionscript a further boost. Stuff like Alchemy show they're investigating new ways to do things. User efforts such as HaXe might show Adobe how to do things too. ;)
wvxvw
11-15-2009, 03:22 PM
Well, to the error safe code: JavaScript or PHP may be examples of the worst case, where all the checking is done at runtime, which requires a lot of debugging, QA etc... + it requires the enviroment executing the code to be very cautious, which costs in terms of performance... AS falls somewhere in between normal languages and these in a sense that if for example you need a method to accept either XML or XMLList, in AS3 you're forced to type the argument to the lesser common denominator, that would be Object. Now, everything in AS3 except undefined is an Object, so, you create a potential error in your code because the language has no API for this kind of methods...
(When in C# or Java you can overload same method with different argument types, and it will agree to accept only XML and XMLList, but not anything else). This creates an error-safe code. And since AS3 and C# are using JIT compiler, this same thing should be doable in both AS3 and C#, however, AS3 doesn't have it :)
And, if you ask me... I have no idea why Flex 4 is what it is... I don't even see it as an improvement over Flex 3... But, I heard an opinion that it is an improvement when speaking in terms of sales... And I'm not a business man in no way, so, well, maybe Adobe know better :) One good thing though is the FXG format.
Barna Biro
11-15-2009, 03:50 PM
Overloading has been quite a long request that Adobe seems to continue to ignore... Still, you can come up with workarounds if you really want to... You could define a method that accepts Object and inside the method you'd check if the passed object is of type XML or XMLList... if it's none of those, then you simply skip... It obviously is not as elegant as overloading, nor is it totally error-free, but it's "doable" :) Anyway, I totally feel what you mean...
Regarding Flex 4: I tried to put it more elegantly in my previous reply but in essence, I feel the same way. I also agree that FXG is one ( if not the single ) good thing that comes with Flex 4... Other than that, it's quite a waste... Flex 4 from a marketing point of view, will surely bring the money it is expected to bring... but it will also bring a lot of frustration because it has been under dev for quite a while and it is really not showing any serious improvements... which is a shame...
Well, this is what we have at the moment... we'll need to live with it or switch. :) I'm still sticking with the technology but I really hope that Adobe will see and understand that without turning away from aggressive-marketing ( intense money making "schemes" ) and "shiny but quite useless features" to "some serious improvements" then they'll wake up loosing a lot of their supporters as soon as any of their competitors starts to provide an easy to use IDE ( mainly to lure a lot of people from Flash IDE ) and features that will actually help in the development process.
bowljoman
11-15-2009, 05:10 PM
my grandma wrote her own compilers for tube computers, and her hard drive was a 'reel to reel' tape machine.
If action script was really 'all that', I wouldn't have to spend so much time optimizing. :p
> Masters degree in Software Engineering... Does that answer your question?
Yes, but I was asking the other guy ;-)
I do agree that the Adobe compiler could be much, much better but I don't think that everything comes down to the compiler... The compiler has been even worse the past years and not many ( if any people ) whined about it. Why? Because 90% of the people using the technology don't actually come from a programming background and until they get the job done, they're cool... Why is this important? It's important because you are trying to convince people with no serious programming experience or background, that "just because you might end up with a faster compiler, you should use it!" ( they might not even know what that is, nor might they care... so you are quite missing your target here ).
All people are able to learn. I know from experience giving tutorials on AS3 that people ask the dumbest of questions because they have not a slightest clue on many of the basic principles of imperative programming. I have had a guy who was wondering why on all frames his loop variable persists, until I told him that in AS3 variables are declared with "var". He had no idea the keyword even existed, he was simply typing "a=1" at the beginning of a frame script. And I am answering these questions often. Of course, not the same as the more advanced concepts of haXe, but the dilemma is the same: give the fish to a hungry man, or teach him fishing? Adobe hands out fish, i tell of great fishing poles :-) If people do not want fishing poles, Adobe is there handing out fish. To each his own, but you assume that noone wants to learn, while I assume that the OP wants to learn ;-) In fact he does, he went as far as "checking out" haXe. I think when you start checking out, do a proper checkout, and here I was pointing out that he missed some of what I consider goodies.
Regarding type reference... No offense but this affirmation "When writing big projects, you get a bit tired of telling a stupid compiler what type of variables you want on a case by case basis" clearly points out that you are not a senior developer yourself... if that's how you feel ( "tired" ) and you consider that having untyped code is "wow!" then that's just sad... rather than feeling euphoric because of some cheap features, people should instead learn how to program correctly. If people "feel tired to type they variables correctly and write correct code" then maybe, those people should never be put to work on more complex projects... if they "get tired" so fast, then they should be kept at creating banners and more "non-complex" things and be payed for 300-400 Euro / month ( don't get me wrong... 300-400 might not be bad for some, but if they prefer to be lazy than write correct code... well, that's their problem ).
I am not lazy. Getting tired of typing does not mean I cut corners when cutting corners makes the table bleed. I use the time you would on typing variable types on assessing and asserting the quality of the program I am working on, taking the birds eye view occasionally and making sure the gears are where they are supposed to be. You know the stuff engineers should REALLY do. Since the dawn of times...I mean when result is in focus, man wants the tools that GET OUT OF HIS WAY to get the job done. This applies to software engineering too. I also know when to actually EXPLICITLY specify variable type, because I know when I can make the correct decision and compiler cannot.
Do you mind telling your friends where the bathroom is a millionth time they come to visit you? This is what basic imperative programming at times feels like. Type inference looks cheap, but could not be more expensive.
I'll bet that I can write code faster in Notepad without any code-hinting than the large majority of people around here... and not only faster, but better and more efficient code. You're point is totally invalid...
How does that make my point invalid? No matter how fast a runner is, he runs faster still with even stronger tail wind. Same way, even you with your mad notepad skills are still slower than you would have been when not having to type variable types on each declaration. And if we replace the Notepad with a real tool (like SciTE f.e. hehehe ;-) then another speed increase, and so on factor by factor. It is a bit like "premature optimization is evil" rule. First learn software engineering, THEN start acquiring better tools. Tools don't help if you don't know what they're for. If you use Notepad, that also tells absolutely nothing of your software developing skills, but it does tell that you like to waste time on bad tools, no matter how skilfull you are. Reading books is easier with better lighting. I type fast too and have compiled a project or two in my life, but I don't torture myself with Notepad and typing "var i: int" for the thousandth time.
So, to conclude: people should use haXe just because an advanced "user" can somewhat outperform others compiler-wise? And because it lets people write untyped code? Thanks, but no thanks...
C'mon, cheap discussion tricks - Rephrasing a question and answering "no thanks". Ah, if that Adobe compiler would get a new version each time I heard this kind of line... :-)
What I was trying to say was (as much as conclusions can be drawn at all) that the OP could benefit from learning more about haXe than reading that "300000 particles with haXe!" article, not in the least because of considering the features like type inference. Not everyone likes to type in Notepad. If typing your program is like talking, then too much talking can be a bad thing. That is one of the things that type inference deals with effectively. By the way it is a planned feature in many languages including C++0x, which is evolution of C++, which is based on C. The good thing about type inference, is you are NOT FORCED to imply types, so you can still type your types if you want to ;-)
Judging an application by lines of code is just as bad... lines of code have nothing to do with the stuff we were discussing here. You can have an application of 10 lines of code and be N times worse than an application of 1000000 tines of code.
What? Remind you, we are comparing applications with the same goals. Lines of code have EVERYTHING to do with what we are discussing. It is the first and most apparent sign of the level of abstraction one is dealing with, meaning that you don't have to tell the compiler what a wheel is, but how to drive the car. Code does not come from nowhere, even if you did not write it yourself. Because and in spite of that, it has been observed that the amount of human mistakes in programs is the same per line of source code, regardless language, in other words, programmers make mistakes "per character typed" (sounds like a very human thing to do, no?) and so languages which let us define more with less typing have us make fewer errors.
I do agree that "good tools can help in many situations" just that I don't see haXe as being such a "great tool"... and well, if "money is an issue" that's again, a problem I personally don't consider... If a company wants to get a job done correctly then it MUST invest into it's tools... no matter how great the "free stuff" might seem to be, the payed things are generally better ( exceptions do exists... but still ).
By all means. No good engineer without good tools. Surprising to hear from someone who does not mind some Notepad now and then ;-) Alright, I am teasing you. Anyway, investing does not mean pouring cash. haXe is the better investment I have made lately. But it was free. The investment costs turned out to be learning its particulars and coping with having to learn them through a mailing list, something I wish the documentation was for instead. Also I wish it had more people working on it, after all Nicolas, although capable of great things, is but one man. Nicolas has potent help, but the compiler core is his work alone, as far as I know. It is its various (and variously useful, by domain) extensions that are handled by other good folks. Also, the attitude is "help us if you can" - something I feel fine about actually. A programmer is a user and a user is a programmer (www.tunes.org).
And last but not least VERY IMPORTANT POINT:
Type inference does NOT bring about untyped variables. I stressed this specifically in my earlier post, yet you (fanjules) still wrote "untyped". Untyped refers here to ActionScript "*" syntax, producing an "Object", where "everything goes" (and usually, but NOT always, does). Only use with care, you are holding a rocket propelled grenade launcher ready to shoot your foot off. "Type inferred" variable declarations on the other hand, are not slower than usual variables, nor are they untyped, because they are still given types, just by the compiler, not you. Your "var i = 1" is the same as typing "var i: int = 1", except you don't have to type it. I don't know what else you mean by "slow code".
I have been using haXe for 7 months now, and I could not go back to ActionScript 3. Type inference is a very good reason. I also like the fact that a simple script installs the whole thing, right from the web. No clicking through install procedure. I am so tired (haha) of manual installs. That way I am lazy, I just have other things to do with my time. And so I have a neat script that can set up haXe for me from NOTHING in two minutes. How much hacking into Flex SDK would I have to do for that? Adobe is like Microsoft. Everything is delivered in chunky packages of something you have no idea what is and whether if you ever ever gonna be needing it.
fanjules
11-15-2009, 06:18 PM
Type inference does NOT bring about untyped variables. I stressed this specifically in my earlier post, yet you (fanjules) still wrote "untyped". Untyped refers here to ActionScript "*" syntax, producing an "Object", where "everything goes" (and usually, but NOT always, does). Only use with care, you are holding a rocket propelled grenade launcher ready to shoot your foot off. "Type inferred" variable declarations on the other hand, are not slower than usual variables, nor are they untyped, because they are still given types, just by the compiler, not you. Your "var i = 1" is the same as typing "var i: int = 1", except you don't have to type it. I don't know what else you mean by "slow code".
I didn't mean untyped in the context of the variables actually being untyped, but written in code the variables clearly have no immediatly visible type. Sorry for the confusion. As I said at the time, maybe this works a lot more elegantly in practice than it sounds. If it's as awesome as you say it is, then great.
I think you're getting overly defensive - my initial post clearly indicated I was coming from the direction of a possible haxe user, and my reasoning is based on why haxe hasn't sold it's concept to me (and still hasn't I'm afraid to say). I'm certain you are mostly certainly in the right here and I'm in the wrong - after all you actually use the darn thing. ;) Ultimatley it will be haxes ability to communicate it's awesomeness to potential users such as me - and not actually if haxe is awesome - that will decide if it sinks or swims.
I didn't mean untyped in the context of the variables actually being untyped, but written in code the variables clearly have no immediatly visible type. Sorry for the confusion. As I said at the time, maybe this works a lot more elegantly in practice than it sounds. If it's as awesome as you say it is, then great.
I am sorry, it is just you alluded to what I thought refers to "untyped" in the sense of "any type" because you asked if these potentially make for slower code, something "any type" variables sometimes do in ActionScript 3.
I think you're getting overly defensive - my initial post clearly indicated I was coming from the direction of a possible haxe user, and my reasoning is based on why haxe hasn't sold it's concept to me (and still hasn't I'm afraid to say). I'm certain you are mostly certainly in the right here and I'm in the wrong - after all you actually use the darn thing. ;) Ultimatley it will be haxes ability to communicate it's awesomeness to potential users such as me - and not actually if haxe is awesome - that will decide if it sinks or swims.
Your observation is right. I am sorry, sometimes I get carried away with drama. No offence. Certainly, my motivation is to illustrate and explain.
I also hope I did my part of "haxes ability to communicate its awesomeness". After all, haXe is not Adobe, everything and anything that is communicated, gets so done by its users. Nicolas does not usually do advertisements :-)
Barna Biro
11-15-2009, 06:43 PM
Talking about cheap discussion tricks... From what I can tell, your English is flawless but you pretend that you didn't understand a simple joke ( "Notepad" ). It's a shame that you got stuck at that single word, "Notepad", and couldn't step out of it's shadow...
Anyway, thanks for taking the time and trying to explain how you see things. Still, I do not agree with you and no matter how tempting might "not typing the variable types" seem, it will still bring more bad then good. It might make feel you better and take some responsibility off your shoulders ( you can always blame the compiler for not making the correct decision when your boss asks "why isn't the stuff you developer working?" ) but where would we get if others would have to continue your work? Do you really expect people to waste days, weeks just to get up to date with the "short" and inexplicit code you wrote ( I'm also guessing that you don't like to comment your code because "it's a waste of time" ) which "the compiler can easy understand" ( but not necessary a human )?
Recalling your example: var i = 1; might be obvious but what if we take it one step higher and say: var i = getContainer(target); would that still be so "obvious to you" as to your precious compiler? Would you know what to do with "i" from that point without having to first check the getContainer method and understand what it does and more importantly what it returns? Does it return a Sprite, or an UIComponent, or maybe the naming is completely wrong and it returns a String? Yeah... that would definitely "speed up development time"...
What you are in fact saying is that programming should be dumbed down to a level where "programmers" as we know them today would become simple users with a list of commands that they can call and perform certain tasks ( and "wow!" afterward ). If you take out "decision taking" and "thinking" out of the equation, then you are in fact even worse than a simple user... you are in fact "the tool".
You don't get born as an Engineer, you "evolve" into one ( you become one )! Becoming an Engineer means that you'll need to take decisions, you'll need to know why things are working the way they are and not only say: var as = someMethod(someObject); and expect the compiler to do all the job for you. Nor will letting the compiler make decision make you a developer...
I also like the fact that a simple script installs the whole thing, right from the web. No clicking through install procedure. I am so tired (haha) of manual installs. That way I am lazy, I just have other things to do with my time. And so I have a neat script that can set up haXe for me from NOTHING in two minutes. How much hacking into Flex SDK would I have to do for that?
This exactly proves my point... you prefer to be "a tool" instead of a developer who actually needs to make certain decision, understand why solution X is better than Y and actually take responsibility for your actions. If you feel good with the script library you have gathered in time from smart people who choose to THINK, TAKE DECISION and DO SOMETHING instead of being "tools", that's your problem.
Obviously, not everyone will or must become a developer or engineer... and it's no shame to be a simple user ( or a "tool" for that matter ), but from what you have stated until now, you are creating an impression ( to me at least ) that you are trying to promote ignorance. Which is bad and sad at the same time...
A programmer is a user and a user is a programmer
If that's what you think, that's your problem. :) I'm sticking to other principles.
Barna Biro
11-15-2009, 07:05 PM
"Type inferred" variable declarations on the other hand, are not slower than usual variables, nor are they untyped, because they are still given types, just by the compiler, not you. Your "var i = 1" is the same as typing "var i: int = 1", except you don't have to type it. I don't know what else you mean by "slow code".
Just to make something clear... Not specifying the type doesn't make your code faster. You are ignoring the fact that for all the decision YOU DO NOT TAKE the compiler will have to make some serious calculations and associations and somehow GUESS what type the variable should be ( so it eats up resources and time )... you are "winning speed" by not writing 3-4 letters to explicitly specify a type, but you are loosing maybe even more precious seconds and compile performance waiting for the compiler to make decisions for you and make the associations you didn't or were not capable to do...
If you ask me, that's just stupid and senseless... I bet that if we would take a closer look at things, then we might discover that all the yapping about "it's faster" would prove to be wrong. You'd be saving a few seconds not specifying types explicitly but you would be wasting even more time waiting for the compiler guess what you couldn't or wouldn't... also, you're making the code your write cryptic and harder to understand...
I agree with fanjules... you are way too defensive and just because you like the technology, it doesn't necessarily make it any better than the others. It might have advantages but it surely has disadvantages too... the problem is that you are consciously ignoring the things you do not agree with and you only see "the good things".
This discussion is starting to get boring and extremely one-sided.
wvxvw
11-15-2009, 07:18 PM
Well, honestly, I cannot see how the fact that you may not type a variable become so important... You can type it if you want... I do so nevertheless I know it is not always needed, just because I'm used to. I wouldn't also call it the very notable feature of the language... or, at least, that would be something very low on my list of advantages... If speaking of disadvantages of HaXe as I see them, it is that being multi-lingual it doesn't have all the features every specific platform has. For instance, E4X doesn't exist in HaXe, or, you don't have custom namespaces. The interaction with flash.* package is somewhat limited in a sense you cannot for example override flash built-in classes' properties in extending class. Well, so far I can tell... But, again, if you need to do precisely that, you have AS3 :) But, on the other hand, you may find those features weren't so good as they might have probably seemed to be :)
Barna Biro
11-15-2009, 07:20 PM
Amin! Finally someone with a more objective point of view! Thank you! ;) :)
cristi_tulcea
11-15-2009, 07:47 PM
Mr Barna, i see you're trying very hard to convince us that haxe is useless. Did you tried it for a wile?
haxe was the best thing happened to me, i came from a poor as2 style programming, with tons of time wasted waiting the Flash to compile and poor error detection. now i'm writing oop code and i detect fast the errors. Another important thing for me is the space on hard, few Mb comparing to few hundreds. And also the little compiler features that if you analyze them separately, you can live without, but are too many of this, so they count in the end.
the compiler wastes time to detect the type of var i = 0;
but the flash compiler on what is wasting time? because haxe is still lot faster.
Barna Biro
11-15-2009, 07:56 PM
If that's what you think and have understood, then you should read my replies again. I'm happy for you that you have found the language that suits your needs but you have totally missed the discussion. Please don't jump into fast conclusions and if you find the reply where I tried to convince anyone that haXe is bad and that it shouldn't be used, please point me to it. :)
Off topic: as general information and "fact", the Flash IDE was not built to be a development IDE, so if you really want to compare or complain about something, you should target Flex Builder. The Flash IDE is a pain in a butt development-wise and it has always been, nothing to discuss there. Nor does haXe has anything to do with the Flash IDE being a poor development environment...
L_O_J
11-16-2009, 12:56 AM
Err...
haXe is like Linux... there will be people who'll use haXe just to "feel more special" than others but haXe will still be in the shadow and sooner or later it will fade away. It really does not bring anything special or actually useful that would make us really want to use it... it's just "another language" and it honestly looks bad... to me, it's like looking at a pile of junk that promises to do 100000 things but it can't even do 1 thing better than any of it's competitors ( like a swiss knife ).
If someone really wants to learn and do programming then he/she should pick up a "real language" ( like C, C++, Java or C#, even AS 3.0 ) and once he is more than proeficient with that language ( which will take some time ) then he can waste his free time if wants to with languages like haXe...
Just to make something clear... Not specifying the type doesn't make your code faster. You are ignoring the fact that for all the decision YOU DO NOT TAKE the compiler will have to make some serious calculations and associations and somehow GUESS what type the variable should be ( so it eats up resources and time )... you are "winning speed" by not writing 3-4 letters to explicitly specify a type, but you are loosing maybe even more precious seconds and compile performance waiting for the compiler to make decisions for you and make the associations you didn't or were not capable to do...
If you ask me, that's just stupid and senseless... I bet that if we would take a closer look at things, then we might discover that all the yapping about "it's faster" would prove to be wrong. You'd be saving a few seconds not specifying types explicitly but you would be wasting even more time waiting for the compiler guess what you couldn't or wouldn't... also, you're making the code your write cryptic and harder to understand...
You really haven't tried haXe are you, LOL. I agree, using type inference, *could* make code become rather cryptic. But that largely depends on the programmer (and his/her programming style).
Discussion such as this usually boiled down to this, programming language is rather personal preference, very subjective. I rather agree with wvxvw (from FD forum ?). AS3 have what haXe don't (at the moment), like better E4X, and haXe have what AS3 don't (also at the moment, depends on Adobe though), like generic type, inlining, etc. And you can use both haXe and AS3.
Is haXe useless ? Well if it is useless motion-twin won't actually used it, for their product like My Brute, won't they, and other people in the mailing list too. Will haXe fade away ? Only time will tell, and currently haXe is pretty much alive and well AFAIK.
wvxvw
11-16-2009, 01:22 AM
Ha, yep, well, actually my postcount here will be a bit bigger, but, yes, that's the same person :)
Just to give another couple of examples of where HaXe is extensively used - 3D engines. Away3D and Alternativa3D. So far I can tell, the Tanks game made with Alternativa3D uses HaXe, and, the game is quite popular, besides, it's being used as a sort of promo for the entire platform. Though it is still an AS3 project. But, as I said before, no one limits you to using either language - it's not like AS2 vs AS3, where you must choose, and the choice is obvious. You can put them together, and that will be beneficial for the result.
I'm looking into writing an automation library based on HaXe Template class. That's not going to happen in the near future, as I haven't gotten good grip of the language yet. But, as I see the opportunities, it looks like much better tool for certain tasks.
fanjules
11-16-2009, 03:55 AM
Is Away3d really operating in HaXe? I done a google search and all I could find was:
* people working in haxe having trouble with getting away3d to work.
* a port of away3d said to be missing many features (if true away3d clearly wasn't originally done in haxe)
Likewise Alternativa3D.
Maybe my google search skills suck. But I have to admit I was very interested to hear that those (or any) 3d engines are haxe based as that changes things significantly, if it were true.
L_O_J
11-16-2009, 06:13 AM
wvxvw probably mean this http://www.slideshare.net/SteelWoLF/tanki-online-multiplayer-3daction-in-browser ,its in Rusian, but there is english subtitle, look at page 51, under non-standard method of optimization.
I don't think wxvxw mean that both Alternativa3D and Away3D is built using haXe, what he mean, maybe, is that some of the demo or some part of it, were made using haXe to use haXe feature(s). The only haXe 3D engine that I know of is Sandy3D, which you can use with AS3, haXe and JS (canvas) too.
fanjules
11-16-2009, 06:22 AM
Thanks for clearing that up. I guess it's kind of irrelevant if the game demo is wrote in HaXe, but 3d engine (the vast majority of the performance load) is not.
Does anybody know if HaXe will allow you to compile C++ code at some point. HaXe only generates code, which as far as I can see you still have to compile manually yourself, unlike the SWF platform which seems to be an all-in-one style solution.
L_O_J
11-16-2009, 10:05 AM
Thanks for clearing that up. I guess it's kind of irrelevant if the game demo is wrote in HaXe, but 3d engine (the vast majority of the performance load) is not.
Does anybody know if HaXe will allow you to compile C++ code at some point. HaXe only generates code, which as far as I can see you still have to compile manually yourself, unlike the SWF platform which seems to be an all-in-one style solution.
Like I said, it's still a *maybe*, I frankly don't know if they used haXe code in the demo, or hacking the engine by replacing some core bits and pieces with haXe.
AFAIK and IMHO, never. I think the current CPP back-end is already correct. SWF(AVM) byte code is VM byte code, which mean, it will be the same on all platform the VM run on. CPP byte code is native machine code, which is a whole different beast. The problems that come to my mind,
1.) Native machine code is not portable, unlike Flash VM Byte Code. Which mean, in order to support x86, PPC, iPhone, etc, will require much-much more hard work and will be hard to maintain.
2.) There are already good (great) compiler support for CPP for each of the above platform. Why reinvent the wheel ? As long as haXe output into standard CPP code, there is a good chance that it will compile just fine.
wvxvw
11-16-2009, 10:35 AM
Regarding Away3D:
http://code.google.com/p/away3d/source/browse/#svn/trunk/haxe
Sure, it wasn't originaly written in HaXe, and I never tried to say that, sorry for confusion.
Regarding Alternativa3D - I spoke to one of the people involved in the project, and that's what he told me: where there was need for optimization, HaXe was used instead of AS3.
cristi_tulcea
11-16-2009, 01:47 PM
If that's what you think and have understood, then you should read my replies again. I'm happy for you that you have found the language that suits your needs but you have totally missed the discussion. Please don't jump into fast conclusions and if you find the reply where I tried to convince anyone that haXe is bad and that it shouldn't be used, please point me to it. :)
Off topic: as general information and "fact", the Flash IDE was not built to be a development IDE, so if you really want to compare or complain about something, you should target Flex Builder. The Flash IDE is a pain in a butt development-wise and it has always been, nothing to discuss there. Nor does haXe has anything to do with the Flash IDE being a poor development environment...
I can compare with flex if you want, but i don't have that monster installed, someone else made the speed tests and haxe is faster.
You're right, i didn't read all your posts because they are from someone who never used haxe. But the idea is very clear, don't try to negate.
Barna Biro
11-16-2009, 02:20 PM
@cristi_tulcea: And what makes you so sure I never used it? You're making too many assumptions based on what? No offense, but I'd keep it down a bit if I were you. If you feel in the mood to flame or just attack people randomly, I'd suggest you find a different thread and maybe even a different forum.
On the other hand, if you think you have anything constructive to say or at least something that does not directly offend others, then I'll be glad to hear your thoughts. Until then, please watch your manners.
Thank you. ;)
grumpytoad
11-16-2009, 10:14 PM
Wow,:eek: it's a testiment to the length of this thread, that the haxe programming language is such a controversial and inflammatory topic. I almost thought when I posted ages ago, "no one gives a damn about haxe in the AS3 camp anyway", but obviously after this length of time, it seems they're all nagging us to admit with some forlorn sense of hope that Adobe will someday add feature X that is better and more superior than haxe. Oh sorry, did I get carried away there ? I thought I was almost caught groping to find something... didn't want to twitch any nerves here, such comments could bring that army of AS3 coders stamping their feet in frustration. :o
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.