Re:JavaScript is not suitable for large web apps
by neilk on Thursday June 14, 2012 @10:48PM
(#4114707)
Which is t3h awesome, but not an option in either language under consideration, as far as I know. Unless you used a Haskell-to-JS compiler. I apologize if I implied that static typing = Java's kind of typing.
Re:JavaScript is not suitable for large web apps
by noblethrasher on Thursday June 14, 2012 @11:34PM
(#4114795)
Java doesn't have pattern matching or nice tuple syntax but it does have Algebraic Data Types. Abstract classes are sum types (the dervived classes are the variants) while interfaces are (awkward) product types.
Re:JavaScript is not suitable for large web apps
by klodolph on Friday June 15, 2012 @04:36AM
(#4115590)
It's not the interfaces that are product types, but the concrete classes which correspond to product types.
Interfaces are a different concept. In functional programming, an implementation of an interface would extend the domain of polymorphic functions that use that interface. The same can be said about Java, if you tilt your head funny and don't need to communicate with other Java programmers, and if you only care about single argument dispatch.
Re:JavaScript is not suitable for large web apps
by silentOpen on Thursday June 14, 2012 @11:19PM
(#4114763)
js_of_ocaml
http://en.m.wikipedia.org/wiki/Algebraic_data_type