News for hackers. Stuff that matters.
Re:GorillaScript by noelwelsh on Sunday July 07, 2013 @06:47AM (#6001695)
Looks interesting.

The section on "Optional Typing" is too brief. Type inference is mentioned, but there are no details on how the type system functions and what a failure of type checking means. It seems one can't name types, which is odd and will lead to a great deal of repetition.

Re:GorillaScript by cameronkknight on Sunday July 07, 2013 @07:10AM (#6001723)
Types are allowed to be any of the primitive types (e.g. Boolean, Number, etc.), null, undefined, any custom "class", a specifically-typed array (e.g. [Number] for an array of numbers), or a specifically-typed object (e.g. {x: Number, y: String}). I do plan on being able to alias the typed object as an "interface", just haven't gotten around to that.

A failure of type checking generally means you get an early runtime error, though I plan on reworking things to catch more at compile-time (while still not being a pain).

Re:GorillaScript by tel on Sunday July 07, 2013 @05:26PM (#6003569)
How do types work with objects and classes? Can you subtype?
Re:GorillaScript by cameronkknight on Sunday July 07, 2013 @06:47PM (#6003924)
Yeah, class Child extends Parent