News for hackers. Stuff that matters.
Re:The Java type system is broken by twblalock on Thursday July 19, 2018 @02:14PM (#17568953)
I prefer my type errors at compile time.

You have to reason about types in any language because passing the wrong type to a function can result in errors. You have to do all of that mental work by yourself in a dynamic language because there isn't a system to do it for you.

Re:The Java type system is broken by tabtab on Thursday July 19, 2018 @08:54PM (#17571648)
There are tools roughly similar to C's "lint" that can warn you about suspicious-looking code. While compile-time checking can be nice, compiler-oriented languages often result in more verbose code. Verbosity introduces errors also. But the benefit weighing also depends on the kind of applications. I didn't mean to trigger a "holy war" of static versus dynamic languages.
Re:The Java type system is broken by runeks on Sunday July 22, 2018 @09:56AM (#17586758)
> Verbosity introduces errors also.

The purpose of types is to introduce errors in the first place - at compile time, if you messed up.

Wrong code causes errors regardless. Annotating with types just moves this event from runtime to compile time.

Re:The Java type system is broken by tabtab on Monday July 23, 2018 @11:18AM (#17593319)
I understand that, but I'm not sure the benefits exceed the drawbacks. In other words, verbosity introduces errors by making the code harder/longer to read. The type-related verbosity may reduce errors, but perhaps not enough to counter those caused by verbosity. In my experience, it's roughly a wash, but depends on a lot of other things, like frameworks used, skill of developers, QA techniques, etc.