http://www.perlmonks.org?node_id=397555


in reply to (OT) "Learn one new language every year"? Yeah, right.

I think what the author intended is not for you to become proficient at a new language every year. Instead you should try a new language each year. Learn new ways of doing things and apply them to the languages you are trying to become proficient at.

For example, I have had a hard time getting my head wrapped around OO in Perl. So I picked up a Java book, I am a little more comfortable with a language focused on OO now I can go back and study OO under Perl. I realize that the implementation may be slightly different, but the concept is the same.

Replies are listed 'Best First'.
Re^2: (OT) "Learn one new language every year"? Yeah, right.
by FoxtrotUniform (Prior) on Oct 08, 2004 at 05:47 UTC
    I think what the author intended is not for you to become proficient at a new language every year. Instead you should try a new language each year. Learn new ways of doing things and apply them to the languages you are trying to become proficient at.

    Part of my point is that you (likely) won't be able to learn new ways of doing things in just one year of study. After a year's exposure to the language, my Perl looked like a funny flavour of C, only with regexes in places (I'd learned regexes earlier, working with Vim and grep). I think it'll take well more than a year to get very much that's useful out of a language.

    --
    F o x t r o t U n i f o r m
    Found a typo in this node? /msg me

      I think it depends on how you look at the language. For instance, I wouldn't say I've learned Smalltalk, in the sense that I would be comfortable writing a proper application in the language, but I've spent enough time with it to get a much deeper understanding of the possibilities of a dynamic object oriented language (like, say, Perl). It also helped me come to understand what it is I don't like about Java and C++ (Static typing is just wrong! OO without blocks/closures isn't really OO! Surely if you're designing a language with OO as its central feature, it would be a good idea to come up with a nice, concise syntax for making use of that feature. Ahem).

      My take on Andy & Dave's advice is to learn enough of a programming language that you can read good code written in it, then do that. Find books that are well respected by people in the language's community (for example, SICP for scheme, On Lisp for common lisp, Smalltalk Best Practice Patterns for Smalltalk...) and read them. You're not trying to become an ace programmer in your new language; you're trying to get a feel for the mindset that goes with the language.

        I don't like about Java and C++ (Static typing is just wrong!

        Java and C++ are not really statically typed, in that they allow casts, in fact they require casts. This means that type errors can occur at runtime, which is exactly what static typing is supposed to prevent. Have a read MJD's excellent talk? You should read some ML or Haskell, you don't have get into monads to appreciate a lot of Haskell's typing system. I'm not even sure if I correctly understand monads because I haven't ever tried to write anything in Haskell but I can still appreciate what real static typing (with type inference so that you don't have keep telling the compiler things it could work out for itself) can do.

        I think it's cecil that brings another rather cool feature to static typing, it lets you get it wrong but still compiles your code (issuing warnings of course). This allows you to experiment with your classes as in a dynamic language without having to rewrite half your code just to get it to compile.

        So yes, Java and C++'s static typing is absolutely wrong but it's not really static typing.

        It also helped me come to understand what it is I don't like about Java and C++ (Static typing is just wrong! OO without blocks/closures isn't really OO!
        I am curious as to how much Java or C++ you have actually programmed. I used to ride on the "Java is evil" band wagon until I actual had to start writing stuff in java. At first it was a pain but the type checking actually helped find a lot of errors quickly. Then I found the great editor eclipse and became a java believer. It takes advantages of java's "evil" typing and saves all sorts of time by been able to do context,type and scope sensitive variable and method completion. It has almost made creating java code as easy as creating perl code. It makes big projects much easier to work on because you do have to go searching for the method names when you cannot remember them. I love perl, but before you knock another language be sure that you have actually used it.
      I spent a couple of weeks recently learning C, as it's the scripting language (!) of a tool I've been using at work. By doing various exercises (reverse a string in place, reverse it word-wise, write string-buffer functions etc.), I learnt about pointer manipulation, structs, and manual memory management: though none of this makes me a C programmer, the learning experience was incredibly useful.

      Maybe it's easier to get something from learning C after Perl than the reverse, because you can't write Perl in C, so you have to learn lower level ways of doing it?

      My experiance differs. For instance, I spent a few days picking through OCaml a while back. I can't say I'm proficient in the langauge, but I did learn a lot about modern type systems (C and Java are not modern type systems). I'm sure I could pick up other things if I used the language every day for a few years, but even the little I did learn was valuable.

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

        That sounds interesting. I've been thinking about making OCaml my next language (mostly because of the mix of functional programming and existing libraries).

        Are there any books/sites/resources would you recommend I start with?

        /J