Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
No such thing as a small change
 
PerlMonks  

Re^2: (OT) "Learn one new language every year"? Yeah, right.

by FoxtrotUniform (Prior)
on Oct 08, 2004 at 05:47 UTC ( #397556=note: print w/ replies, xml ) Need Help??


in reply to Re: (OT) "Learn one new language every year"? Yeah, right.
in thread (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.

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


Comment on Re^2: (OT) "Learn one new language every year"? Yeah, right.
Re^3: (OT) "Learn one new language every year"? Yeah, right.
by pdcawley (Hermit) on Oct 08, 2004 at 06:32 UTC
    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.

        Java and C++ are not really statically typed

        They are not strongly typed, but they are statically typed. There is a distinction. Strong typing means you cannot easily convert between data types (for instance, Perl is strongly typed. It is not particularly easy to convert between an array and a scalar). Static typing means the types are determined at compile-time. Casting is what you have to do in C and Java to circumvent the static type checking.

        If you look at MJD's excellent talk again, you'll notice it is saying that strong typing can be good. It is also describing why static typing, as implemented in Pascal and C (and by extension, Java), is not very helpful.

      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.

        If you like Java's type checking, you'll love any language with a modern Hindley-Milner type system. (Haskell is one; I believe OCaml is another.) My mental model of this type systems keeps evolving; right now it's something like a lightweight OO system with easy and unambiguous multiple inheritance, augmented with recursive typing. Of course I despised it when I started writing Haskell -- I was used to the Lispy "lots of conses" method of functional programming -- but it's grown on me.

        --
        Yours in pedantry,
        F o x t r o t U n i f o r m

Re^3: (OT) "Learn one new language every year"? Yeah, right.
by osfameron (Hermit) on Oct 08, 2004 at 09:02 UTC
    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?

Re^3: (OT) "Learn one new language every year"? Yeah, right.
by hardburn (Abbot) on Oct 08, 2004 at 13:38 UTC

    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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://397556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-04-18 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls