On 2007-11-14, at 00:14 EST, Yuh-Ruey Chen wrote: > Oh come on :) I was referring to the syntax of the class system, which > is undoubtedly Java-esque. Lot of Java haters in the functional (no > 1st-class functions!) and scripting (too verbose!) programming crowd. > Pretty much everyone's first impression of the class system in ES4 is > that Java is being merged into the language. Kinda like how everyone > thinks that Java inherited its type system from C++ instead of > Modula-3.
A key difference from Java is that types are optional. There is not enough experience with es4 yet to know, but in other type-optional languages I have worked with, I did not have a Java-esque feeling of verbosity. Perhaps this is because I was coming from a dynamically- typed background, so I did not have the reaction that given types I had to declare them everywhere. Someone coming from a statically- typed background might just continue their old habits and never discover the freedom and power of leaving out unnecessary declarations. In my experience with Dylan, it worked best to only specify types to enforce contracts and to dispatch generic functions. In particular, you almost never declared the types of local variables, the compiler would work that out for you. Ideally, a type-inferencing compiler should be able to warn you when the lack of a type declaration will cause a run-time type check (safety warning) or run-time dispatch (performance warning). _______________________________________________ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss