Using D
Russel Winder via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 25 04:03:39 PDT 2014
On Mon, 2014-08-25 at 09:55 +0200, Marco Leise via Digitalmars-d wrote:
[…]
> Yes, Java is verbose, but its modularity makes it very
> flexible. The classic example is how you read lines of text
> from a file. Instead of a special class for that, you take
> use simple primitives with descriptive names and assemble
> something that reads lines of UTF-8 text from a buffer that
> has a file as its input. It actually acknowledges quite a bit
> of real-world mess when you look at it, for example different
> encodings on stdin and stdout.
Groovy makes it even easier. I avoid using Java if I can use Groovy,
which is about 100% of the time now with @CompileStatic.
> Conventions like beans, where every property is implemented as
> a pair of getter/setter or naming rules like ...Adapter,
The Bean Protocol is about the worst offence committed by the Java
Platform. It destroys encapsulation and any thought of object-oriented
programming.
> ...Comparator make it easy to reflect on unknown code.
Java reflection is really a bit of a mess. Another reason for using
Groovy it makes working with the JVM reflection system much easier.
> On the one hand it is limiting to only have Java OOP in the
> toolbox, on the other hand it is cheap to train someone on
> Java and Java libraries and actually not a horror to try and
> make sense of other people's code, because it wont be
> implemented in any of 5 different paradigms + s.o.'s personal
> naming conventions.
Java "OOP" isn't really OOP.
> I've never been a fan of developing in vi or emacs and as far
> as I am concerned, a programming language need not be designed
> like a human language. There are many graphical programming
> environments as well, for example for physics.
Emacs is the One True Editor, not using it is clearly a declaration of
war :-)
> The simpler the language the more robust the refactoring tools
> can become. The more conventions are in use, the better custom
> tailored tools and IDEs can emerge. I.e. in Eclipse you only
> type the capital letters of a long class name and have the
> auto-completion figure out which class in scope or available
> import paths matches these "initials". Heck, it even fills in
> the parameters when you call a method using the available
> variables in scope. If you were unaware that you need a third
> argument, the IDE can generate a new variable with a name
> based on the method parameter or place a constructor call for
> the required type.
> Sometimes you can just focus on the program logic and have the
> IDE generate most of the code. Delphi's and C# IDEs similarly
> expose properties of GUI objects in tables and generate the
> code for event handlers on double-clicks. It saves time, you
> cannot misspell anything... I like it.
I switch between Emacs, Vi, Eclipse, IntelliJ IDEA, PyCharm, Wing IDE,
depending on programming language and activity. None of the tools work
for all situations. It would be nice if they did, but there is always
something wrong for a given activity.
IDE popups can be a useful tool, the problem with over-reliance,
particularly for the weaker programmers is that they create code they do
not understand. In the Eclipse/Java context, I see far too much in the
way of "form filling of template" type programming by people who are
working under the impression that because they are using a template
nothing can go wrong.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140825/fd97989f/attachment.sig>
More information about the Digitalmars-d
mailing list