Looking for champion - std.lang.d.lex [Java and IDE's]
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Fri Nov 19 13:42:05 PST 2010
On 27/10/2010 05:39, Walter Bright wrote:
>> What I miss more in Java is not single structs (single values),
>
> There's a lot more to miss than that. I find Java code tends to be
> excessively complex, and that's because it lacks expressive power. It
> was summed up for me by a colleague who said that one needs an IDE to
> program in Java because with one button it will auto-generate 100 lines
> of boilerplate.
I've been hearing that a lot, but I find this to be excessively
exaggerated. Can you give some concrete examples?
Because regarding excessive verbosity in Java, I cab only remember tree
significant things at the moment (at least disregarding meta
programming), and one of them is nearly as verbose in D as in Java:
1) writing getters and setters for fields
2) verbose syntax for closures. (need to use an anonymous class, outer
variables must be final, and wrapped in an array if write access is needed)
3) writing trivial constructors whose parameters mirror the fields,
and then constructors assign the parameters to the fields.
I don't think 1 and 2 happens that often to be that much of an
annoyance. (unless you're one of those Java persons that thinks that
directly accessing the public field of another class is a sin, instead
every single field must have getters/setters and never ever be public...)
As an additional note, I don't think having an IDE auto-generate X lines
of boilerplate code is necessarily a bad thing. It's only bad if the
alternative of having a better language feature would actually save me
coding time (whether initial coding, or subsequent modifications) or
improve code understanding. _Isn't this what matters?_
--
Bruno Medeiros - Software Engineer
More information about the Digitalmars-d
mailing list