Extracted from: Seven Languages in Seven Weeks A Pragmatic Guide to Learning Programming Languages This PDF file contains pages extracted from Seven Languages in Seven Weeks, published by the Pragmatic Bookshelf. For more information or to purchase a paperback or PDF copy, please visit http://www.pragprog.com. Note: This extract contains some colored text (particularly in code listing). This is available only in online versions of the books. The printed versions are black and white. Pagination might vary between the online and printer versions; the content is otherwise identical. Copyright 2010 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. The Pragmatic Bookshelf Dallas, Texas Raleigh, North Carolina
Seven Languages in Seven Weeks A Pragmatic Guide to Learning Programming Languages Bruce A. Tate The Pragmatic Bookshelf Dallas, Texas Raleigh, North Carolina
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http: /pragprog.com. The team that produced this book includes: Jackie Carter (editor) Potomac Indexing, LLC (indexer) Kim Wimpsett (copyeditor) Steve Peter (typesetter) Janet Furlow (producer) Juliet Benda (rights) Ellie Callahan (support) Copyright 2010 Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-13: 978-1-934356-59-3 Printed on acid-free paper. Book version: P5.0 March 2012
Contents Dedication.............? Acknowledgments...........? Foreword.............? 1. Introduction............? 1.1 Method to the Madness? 1.2 The Languages? 1.3 Buy This Book? 1.4 Don t Buy This Book? 1.5 A Final Charge? 2. Ruby..............? 2.1 Quick History? 2.2 Day 1: Finding a Nanny? 2.3 Day 2: Floating Down from the Sky? 2.4 Day 3: Serious Change? 2.5 Wrapping Up Ruby? 3. Io...............? 3.1 Introducing Io? 3.2 Day 1: Skipping School, Hanging Out? 3.3 Day 2: The Sausage King? 3.4 Day 3: The Parade and Other Strange Places? 3.5 Wrapping Up Io? 4. Prolog..............? 4.1 About Prolog? 4.2 Day 1: An Excellent Driver? 4.3 Day 2: Fifteen Minutes to Wapner?
v Contents 4.4 Day 3: Blowing Up Vegas? 4.5 Wrapping Up Prolog? 5. Scala..............? 5.1 About Scala? 5.2 Day 1: The Castle on the Hill? 5.3 Day 2: Clipping Bushes and Other New Tricks? 5.4 Day 3: Cutting Through the Fluff? 5.5 Wrapping Up Scala? 6. Erlang..............? 6.1 Introducing Erlang? 6.2 Day 1: Appearing Human? 6.3 Day 2: Changing Forms? 6.4 Day 3: The Red Pill? 6.5 Wrapping Up Erlang? 7. Clojure..............? 7.1 Introducing Clojure? 7.2 Day 1: Training Luke? 7.3 Day 2: Yoda and the Force? 7.4 Day 3: An Eye for Evil? 7.5 Wrapping Up Clojure? 8. Haskell..............? 8.1 Introducing Haskell? 8.2 Day 1: Logical? 8.3 Day 2: Spock s Great Strength? 8.4 Day 3: The Mind Meld? 8.5 Wrapping Up Haskell? 9. Wrap-Up.............? 9.1 Programming Models? 9.2 Concurrency? 9.3 Programming Constructs? 9.4 Finding Your Voice? A1. Bibliography............? Index..............?