Re: Java Philosophy
- From: Wildemar Wildenburger <lasses_weil@xxxxxxxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 21:10:53 +0100
Roedy Green wrote:
I hate relaxed type languages. Yes strict typing takes more type toI know I shouldn't do this but ...
type, but it saves time in the long run. It is much easier to
understand what the code is doing when you have the types clearly laid
out. Compile time checking excludes many errors.
It's all a matter of what you're used to. I usually don't care for the type of a variable, for the very reason that Python is designed around just that notion. I don't need to know what type a variable has, just what can be done with it, and that is usually obvious from the code.
I don't really see the benefit of writing
Thing foo = new Thing();
instead of just
foo = Thing()
OK, it might make more sense when it comes to interfaces, but here I don't see any benefit.
I can better understand the strict typing in method signatures. But again, Python does "duck typing", so usually the docstring right below the function definition is all you need, most if the time. This of course, depends heavily on programmers writing descent documentation, which is not to be expected.
So I agree and disagree.
It comes down to what you are doing. If you are whipping out littleReading that just breaks my little pythonic heart. :( (;))
one shot programs that you run once, then discard, and you are a slow
typist, then relaxed typing is the way to fly.
If you write systems that you keep coming back to for maintenance over
the years, approaching each time cold, largely forgetting how the
program works, with only your notes and the code to get up to speed,
then you appreciate the tight typing.
Python was designed with the idea that code is usually read more often than it is written. So it is actually very easy to go (back) to a python program that you haven't seen in a long time if at all. Again, it is what you are used to reading and thinking that makes a particular type of program hard or easy to understand. If you expect to see type definitions everywhere, then of course you're going to miss them. If you're not used to them, they will bug the hell out of you. But I wouldn't claim that any aproach is generally worse than the other.
Learning to type quickly, using a high quality keyboard such as theMy problem is not really the typing (though I *am* slow at that), but the fixture. My mind just isn't used to deciding on the datatype of a variable. I'm used to trying one an then changing it if my initial descision was bad. That is of course possible in any language, but in Java you have to make changes in much more places.
kinesis or Maltron, and an optimised layout such as DSK, can take much
of the pain out of the verbosity. A smart IDE helps too.
see http://mindprod.com/bgloss/keyboard.html
I don't know, I'll get used to it sooner or later.
/W
PS. Thanks for the keyboard tips; I'm looking into touch typing but I've used my idiosyncratic method for years so that is hard to learn touch.
.
- Follow-Ups:
- Re: Java Philosophy
- From: RedGrittyBrick
- Re: Java Philosophy
- From: John W. Kennedy
- Re: Java Philosophy
- References:
- Java Philosophy
- From: Wildemar Wildenburger
- Re: Java Philosophy
- From: Roedy Green
- Java Philosophy
- Prev by Date: Re: Recommend a good free text editor?
- Next by Date: Re: servlet how to show "loading image"
- Previous by thread: Re: Java Philosophy
- Next by thread: Re: Java Philosophy
- Index(es):
Relevant Pages
|