[PLUG] Java book
Eric Wilhelm
scratchcomputing at gmail.com
Wed Jul 22 03:07:22 UTC 2009
# from Jason Dagit
# on Monday 20 July 2009:
>I think the only substantial criticism to this approach is that it can
> be tempting to try to write the familiar thing in the same style as
> you wrote before. But, often the style of authoring needs to change
> with the new language in order if you want to take advantage of the
> strong points of the language. In other words, I don't recommend
> translating the code "verbatim"
I agree that a solution in one language should typically use different
idioms and paradigms than a solution in another language. However,
while learning a new language, most programmers are going to find that
it is much easier to lean on familiar concepts "I know how to do this
in language X, so how do I spell that in language Y?" And, it's
probably difficult to challenge yourself to pickup the new language's
paradigms -- so you write C-like in Perl instead of using closures,
objects, hashes, or map()s.
Particularly if you're solving a problem of your own definition rather
than following a tutorial. I typically learn new ways to approach
things by looking at someone else's code.
Before you can use a language's strongest features, you probably need to
solve some toy problems/tutorials to learn what they are. Then go back
to your largish-but-familiar problem and see how you can use those
features more and how that changes your solution.
--Eric
--
The reasonable man adapts himself to the world; the unreasonable man
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
--George Bernard Shaw
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the PLUG
mailing list