News for hackers. Stuff that matters.
Re:Try Haxe by yxhuvud on Sunday June 10, 2012 @12:01PM (#4091376)
You lost me at 'public static function main.'
Re:Try Haxe by andolanra on Sunday June 10, 2012 @05:55PM (#4092354)
They found me again at

  enum Cell<T> { nil; cons(car : T, cdr : Cell<T>); }
 
  class List {
    public static function mymap<A, B>(f : A -> B, l : Cell<A>) : Cell<B> {
      return switch(l) {
        case nil: nil;
        case cons(x, xs): cons(f(x), mymap(f, xs));
      }
    }
  }
Some of the Java heritage does seem slightly unpleasant, but interesting features like ML-style tagged enums and structural subtyping for record types mean I'm not going to discount the whole thing just yet.
Re:Try Haxe by boofar on Sunday June 10, 2012 @02:16PM (#4091729)
Functions are public by default. You could leave that out.

The main function has to be static and will serve as the entrance point of the program, not the class. So this might just look like too much when in fact this is just a very small code sample.

Did I address some of your concerns, or did I miss the point entirely? Just curious.

Re:Try Haxe by jonpacker on Sunday June 10, 2012 @02:22PM (#4091739)
I think his comment could be refrased as "This language looks like Java"
Re:Try Haxe by clemos on Sunday June 10, 2012 @03:04PM (#4091863)
Also, IMHO the fact that Haxe looks familiar to people coming from Javascript, ActionScript, or Java is a plus.
Re:Try Haxe by WiseWeasel on Sunday June 10, 2012 @04:34PM (#4092117)
Agreed. I'd wager there are substantially more people learning JavaScript these days than PHP, not that PHP looks too foreign, relatively speaking.
Re:Try Haxe by clemos on Sunday June 10, 2012 @02:56PM (#4091831)
Well at least it doesn't look like PHP...
Re:Try Haxe by clemos on Sunday June 10, 2012 @02:22PM (#4091741)
Actually functions are private by default.

"static function main()" seems to work as an entrance point, though, which makes sense somehow...

Re:Try Haxe by boofar on Sunday June 10, 2012 @02:25PM (#4091752)
I'm sorry, you're correct of course! Private is the sane default obviously.
Re:Try Haxe by CodeMage on Monday June 11, 2012 @08:59AM (#4094333)
Yeah, and those shoes totally don't match that purse! What an outrage!

Seriously, if you're prepared to throw out the whole language based on what its syntax resembles, your decision-making process might need a bit of work.