4 ms·
I'd been meaning to pick up a new language, and a few weeks ago I pared down my list of choices to two languages: Scala and Go. Then I went looking for "officia
by GeneralMaximus 15y ago
I'd been meaning to pick up a new language, and a few weeks ago I pared down my list of choices to two languages: Scala and Go. Then I went looking for "official" tutorials/references. For Scala I found Scala by Example, a 145 page PDF that comes with the Scala docs. For Go, I found the Go tutorial -- a very short tutorial with a bunch of examples.
I picked Go because, seriously, I don't have time to read 145 pages just to get started. I'd be fine if Scala By Example introduced me to the major features of the language in a single whirlwind tour so I could at least start solving simple algorithmic problems, but the Scala folks went for something more elaborate. If it works for them, cool.
Ever read the Python tutorial? Even though it omits a bunch of important stuff, like decorators, it gives you enough information to get started with the language. A more dedicated learner can just read the PEPs or the language reference to learn about advanced features as he needs.
This is what I do with Go these days: look up features I'm having trouble with in the reference.
A friend once said this: "I'm convinced that in reality the documentation is the product."
- tehjones 15y agoThe first chapter of K&R is a tutorial introduction, it explains the entire workings of the C language for someone familiar to programming in a small number of pages(It misses pointers, but it covers a lot). Every book on a language needs this. The best I have seen was in a python book where the author stopped and told the reader enough had been learnt to write any program. The closet to the K&R model I have seen is with the Big Nerd Ranch books.
- geoffreyvanwyk 15y ago<quote>The best I have seen was in a python book where the author stopped and told the reader enough had been learnt to write any program.</quote> You must be referring to Think Python: http://www.greenteapress.com/thinkpython/thinkpython.html http://www.greenteapress.com/thinkpython/thinkpython.html
- pash 15y agoThink Python is a fantastic intro-programming text. After mucking about with bits of code for a couple of years, I picked up Downey's previous version of the book, and that's when I became a programmer. I highly recommend it to the handful of HN readers who are in need of an intro text.
- anthonyb 15y agoIt's a model that I followed when I wrote Hello Python. The theory being that the way that most of the good programmers that I know learned was by extending their knowledge, not by inhaling massive chunks of information. I'm now reading K&R, and I'm surprised at the similarities, although I introduced new libraries just as much as new language features.
- msie 15y agoEvery time I try to learn Scala I get the feeling that it's too big.
- dkarl 15y agoIt's definitely not the kind of language that you spend a few weeks or months with to learn a few new concepts. It's a language you learn because you can see yourself doing a lot of real programming in it. I call it the C++ of the Java world, meaning that Scala is to Java as C++ is to C: a more complex and expressive language that piggybacks on top of a hugely successful ecosystem and is a powerful tool for those who invest the time to learn it well. I'm learning it because I think it has a bright future in commercial software development, and it's nicer to work with than most languages that can say that.
- deleted 15y ago[deleted]
- andrewcooke 15y agoIt struck me the other day that I would love a "Scala: The Good Parts". Wouldn't it be great if there was a small, powerful kernel in there, somewhere, and someone explained it...
- defroost 15y agoWhile definitely not small, the stairway book, "Programming in Scala" by Odersky, mentioned in the article, is an excellent tutorial style book. The second edition was just released in January.
- msie 15y agoEven if there were such a book, you'd have to deal with other people's code that used the "Bad Parts" of Scala. I dread deciphering clever Scala one-liners.
- CCs 15y agoHad the same issue, same two languages. Google Go still feels far from prime time, so I settled on Scala. Got David Pollak's "Beginning Scala" book, Googled a lot and after several days of coding it clicked. Well worth the effort! The Web frameworks are not yet there (Lift is complex, Play is slow), but I learnt a lot. I still keep my eye on Go, code most of the time C++/C++0x, some projects in Scala, and hope one day I can have all the benefits in one place.
- CCs 15y agoGoogle research got to the same conclusion: http://www.theregister.co.uk/2011/06/03/google_paper_on_cplusplus_java_scala_go/ http://www.theregister.co.uk/2011/06/03/google_paper_on_cplu...
- timtadh 15y ago+1 to Go. I am not aware of any books on it. But between the spec, Effective Go, and the tutorial you can learn the entire language in a matter of days if you have serious project you want to work on.
- hackinthebochs 15y agoI'm the exact opposite. I hate to "tinker" around with languages or frameworks. I hate the feeling of not knowing what I'm doing and have to google for every bit of progress. I think this is where modern trends in programming language books, and by extension language learners who enable these books, gets it wrong. Everyone is trying to teach you the bare minimum to get started, and they leave you to struggle with the rest. This is a big reason why there are so many programmers who barely know anything below the surface of the language they've been using for years. I like taking a fairly broad tour of a language before digging in. I like knowing what the essence of the language is. I like knowing whats possible and what isn't. I hate the feeling of being blind, feeling around the room for the door knob to get me into the next room where the process is repeated.
- dlo 15y ago> I picked Go because, seriously, I don't have time to read 145 pages just to get started. You don't need to read 145 pages to get started. Most people I've talked to only know 20-30% of Scala. But they feel that they already know enough to benefit enormously. Most of the Scala I know comes from the Tour of Scala, which consists of succinct, bite-size explanations of its main features. On a related note, Scala is a big language because it is a dual language: It has features that are intended to facilitate application development, but it also has features that are intended for framework writers. These features are overkill for you if you're an application writer, and you don't have to learn them, but they are a godsend if you're writing a framework. This is evidenced by the fact that many features that are traditionally done in the compiler of other languages are implemented in the library!
- dlo 15y agoIMO, Scala is a tasteful collection of the best features from a bunch of different languages, including ML, Haskell, Smalltalk, and Clojure. [1] If I taught a survey course of programming language features, such as Stanford's CS 242, Scala is the language I would use to teach it. [1] And they are not transplanted unmodified; often, since Scala has the advantage of hindsight, they are often modified to be even better!
- StavrosK 15y agoI also didn't like the verbosity of intro-level books/tutorials and decided to write my own for Python: http://www.korokithakis.net/tutorials/python/ http://www.korokithakis.net/tutorials/python/ It introduces most features of the language over 10ish pages, but assumes that you're familiar with programming.