On Sun, 2012-07-22 at 16:41 -0300, Ricky Clarkson wrote: > Let me know when int i = "hello"; is rejected by the compiler and I'll look > again.
Clearly you are a static typing sort of person, so stick with static typed languages. Dynamically typed languages do not obey the same typing rules as statically typed languages, and nor should they; the whole point is that statically and dynamically typed languages are different. int i = 'Hello' can never be caught as an error at compile time by a dynamically typed language since all type checking is at run time. Groovy correctly throws an exception on this line with ClassCastException. Conversely, tell me when typing works properly in Java. ArrayList<String> x = new ArrayList<String> ( ) ; really? Why? This is 201x, surely type inference should be an integral part of any modern language. And really: ArrayList<String> x = ArrayList<> ( ) ; is just no solution at all. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
