I just discovered haXe - for me, is it worth learning?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

I just discovered haXe - for me, is it worth learning?

Eric Vernon
Hi all,

I just discovered haXe.  Actually, I was scanning the Ubuntu repositories for a good code editor when I saw haXe on my search's results list.  I decided to learn more, and immediately liked the concept of haXe - a language which can compile into several other languages.  However, I'm so heavily entrenched in PHP and JavaScript I don't know if it's worth learning haXe at this point.  I'm at a beginner to intermediate level at JavaScript, but would consider myself advanced at PHP with about 8 months of spending hours daily and staying up all night coding it.

So, would haXe be a good choice for me?  How much would I have to relearn?  Also, how many of PHP's functions have been ported over to haXe?  I use even the obscure features of it like variable variables (the $$foo construction), and functions like nl2br().  How quickly is haXe evolving -- how often are new API functions added?  How much is shared between the languages?, that's the most lucritive part :P.

I appreciate you answering my questions!  Best wishes to all of you,
Eric

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: I just discovered haXe - for me, is it worth learning?

James W. Hofmann
> I don't know if it's worth learning
> haXe at this point.  I'm at a beginner to intermediate level at JavaScript,
> but would consider myself advanced at PHP with about 8 months of spending
> hours daily and staying up all night coding it.

haXe is VERY similar to Javascript in syntax. Many - though not all -  
lines of code will function identically. PHP is substantially  
different, but as a language it's also much less clean.

haXe has a very tight design compared to both JS and PHP, and it adds  
stronger typing and OO structure - code must always go in classes, and  
the compiler will throw up type errors that JS and PHP don't see until  
runtime. It will also add some overhead in the form of built-in data  
structures, but in most cases the generated code is as efficient or  
better than code hand-written in the target.

> So, would haXe be a good choice for me?  How much would I have to relearn?
> Also, how many of PHP's functions have been ported over to haXe?  I use even
> the obscure features of it like variable variables (the $$foo construction),
> and functions like nl2br().  How quickly is haXe evolving -- how often are
> new API functions added?  How much is shared between the languages?, that's
> the most lucritive part :P.

The most unusual of the required concepts in haXe is probably the type  
system. I can't speak for the PHP support(it's still pretty new) but  
the built-in APIs for each target should match the target API 100%;  
anything else is a bug. Additional libraries are appearing pretty  
steadily and the list has gained a lot of traffic in recent months.

What's most exciting, for me, is that the code-sharing ability of haXe  
makes it possible to consider different platforms mostly on their  
runtime metrics - ease of deployment, performance, etc. - instead of  
what kinds of features the API has.


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: I just discovered haXe - for me, is it worth learning?

Lee Sylvester
In reply to this post by Eric Vernon
It takes years to become a good programmer, and one wouldn't normally
achieve that with a couple of languages alone. At best, at least
experiment, and see how things are done in haXe. Like many, I'm sure
you'll prefer it. haXe allows you to develop in PHP properly. PHP is
very old (as languages go), and only recently gained OO capabilities, so
it has a lot of hacks, shortcuts and general untidyness. haXe will
change that perception, and allow you to develop code cleanly and with
proper OO methods. This will mean you'll become a better programmer, and
be able to pick up future languages more easily.

Lee




Eric Vernon wrote:

> Hi all,
>
> I just discovered haXe.  Actually, I was scanning the Ubuntu
> repositories for a good code editor when I saw haXe on my search's
> results list.  I decided to learn more, and immediately liked the
> concept of haXe - a language which can compile into several /other/
> languages.  However, I'm so heavily entrenched in PHP and JavaScript I
> don't know if it's worth learning haXe at this point.  I'm at a
> beginner to intermediate level at JavaScript, but would consider
> myself advanced at PHP with about 8 months of spending hours daily and
> staying up all night coding it.
>
> So, would haXe be a good choice for me?  How much would I have to
> relearn?  Also, how many of PHP's functions have been ported over to
> haXe?  I use even the obscure features of it like variable variables
> (the $$foo construction), and functions like nl2br().  How quickly is
> haXe evolving -- how often are new API functions added?  How much is
> shared between the languages?, that's the most lucritive part :P.
>
> I appreciate you answering my questions!  Best wishes to all of you,
> Eric


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: I just discovered haXe - for me, is it worth learning?

Benjamin Dasnois
As Lee said, just try it! Knowing (or at least learning a bit) a lot
of languages is the good path to become a good developer ! Your first
good point is that just seeing haXe on a result list made you
investigate more. It seems like you are a potentially good candidate
for learning haXe ! ;)

I'm sure that after a few hours, you'll prefer haXe. :)

Regards,

On Tue, Oct 21, 2008 at 8:17 AM, Lee McColl Sylvester
<[hidden email]> wrote:

> It takes years to become a good programmer, and one wouldn't normally
> achieve that with a couple of languages alone. At best, at least experiment,
> and see how things are done in haXe. Like many, I'm sure you'll prefer it.
> haXe allows you to develop in PHP properly. PHP is very old (as languages
> go), and only recently gained OO capabilities, so it has a lot of hacks,
> shortcuts and general untidyness. haXe will change that perception, and
> allow you to develop code cleanly and with proper OO methods. This will mean
> you'll become a better programmer, and be able to pick up future languages
> more easily.
>
> Lee
>
>
>
>
> Eric Vernon wrote:
>>
>> Hi all,
>>
>> I just discovered haXe.  Actually, I was scanning the Ubuntu repositories
>> for a good code editor when I saw haXe on my search's results list.  I
>> decided to learn more, and immediately liked the concept of haXe - a
>> language which can compile into several /other/ languages.  However, I'm so
>> heavily entrenched in PHP and JavaScript I don't know if it's worth learning
>> haXe at this point.  I'm at a beginner to intermediate level at JavaScript,
>> but would consider myself advanced at PHP with about 8 months of spending
>> hours daily and staying up all night coding it.
>>
>> So, would haXe be a good choice for me?  How much would I have to relearn?
>>  Also, how many of PHP's functions have been ported over to haXe?  I use
>> even the obscure features of it like variable variables (the $$foo
>> construction), and functions like nl2br().  How quickly is haXe evolving --
>> how often are new API functions added?  How much is shared between the
>> languages?, that's the most lucritive part :P.
>>
>> I appreciate you answering my questions!  Best wishes to all of you,
>> Eric
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: I just discovered haXe - for me, is it worth learning?

clemos
In reply to this post by Eric Vernon
Hi Eric

You can switch "smoothly" to haXe (like I do): just start by writing
some parts of your projects using haXe.
haXe is very close to Javascript (as James said), so you may start by
trying to target Javascript, and keep the rest in native PHP.
Then when you feel comfortable with compiling, strong-typing, etc, you
can write server-side apps with haXe, and compile to PHP.

Anyway, your knowledge in Javascript / PHP won't be lost, because you
need to know your target platform's language even if you write
everything in haXe... As a developer, I also think you must prepare
yourself to learn new languages and things all the time.

> So, would haXe be a good choice for me?

It's obvious : yes.

> How much would I have to relearn?

Not that much, and anyway the things you'll learn will anyway be
useful to you if you want to learn Flash/AS3, or even Java.

> Also, how many of PHP's functions have been ported over to haXe?  I use even
> the obscure features of it like variable variables (the $$foo construction),
> and functions like nl2br().

$$ and nl2br are very different.
nl2br is a very simple function. In haXe, you could easily write a
similar function yourself, and thus make it usable in all target
platforms (JS, PHP, but also Neko, Flash, ...). In haXe/PHP, you can
also probably (though I don't know how exactly :p) use PHP's native
nl2br, though you loose some of the philosophy and benefits of using
haXe. Btw nl2br is not very obscure, in my opinion.
$$ is somehow part of the PHP syntax. The OO structure of haXe is very
different from php, which supports some OO features but is not stricty
OO... So haXe will likely require that you change your way of thinking
code. It's more strict, but it's also more clean, both conceptually
and physically (in your code).

+++++
Clément

>  How quickly is haXe evolving -- how often are
> new API functions added?  How much is shared between the languages?, that's
> the most lucritive part :P.

On Tue, Oct 21, 2008 at 2:32 AM, Eric Vernon <[hidden email]> wrote:

> Hi all,
>
> I just discovered haXe.  Actually, I was scanning the Ubuntu repositories
> for a good code editor when I saw haXe on my search's results list.  I
> decided to learn more, and immediately liked the concept of haXe - a
> language which can compile into several other languages.  However, I'm so
> heavily entrenched in PHP and JavaScript I don't know if it's worth learning
> haXe at this point.  I'm at a beginner to intermediate level at JavaScript,
> but would consider myself advanced at PHP with about 8 months of spending
> hours daily and staying up all night coding it.
>
> So, would haXe be a good choice for me?  How much would I have to relearn?
> Also, how many of PHP's functions have been ported over to haXe?  I use even
> the obscure features of it like variable variables (the $$foo construction),
> and functions like nl2br().  How quickly is haXe evolving -- how often are
> new API functions added?  How much is shared between the languages?, that's
> the most lucritive part :P.
>
> I appreciate you answering my questions!  Best wishes to all of you,
> Eric
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org