Clojure Polymorphism - Paul Stadig - E-Book

Clojure Polymorphism E-Book

Paul Stadig

0,0
16,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Learn when and how to use Clojure's polymorphic features to develop efficient multithreaded applications

Key Features

  • Get to grips with the different polymorphic tools that Clojure offers
  • Develop a taste for good Clojure designs through various engaging examples
  • Study various design principles and learn ways to use them in your applications

Book Description

Clojure is a modern, dynamic language that you can use to develop robust, multithreaded programs. Clojure Polymorphism is a comprehensive guide that shows you how to use Clojure's features to your advantage.

The book begins by describing examples that show how to define and implement abstractions with plain functions and multimethods. Then you'll analyze these examples and separate the good and bad aspects of their design principles. You'll also learn how to perform data transformation abstraction with a plain function and discover how to write new cross-platform predicates while keeping the core of your abstraction free from reader conditionals. The later chapters explain the considerations to keep in mind when implementing Clojure protocols on the Java Virtual Machine (JVM).

By the end of this book, you'll know how to use the various polymorphic tools of Clojure to your advantage while designing your applications.

What you will learn

  • Explore how polymorphism is implemented in Clojure
  • Discover what design principles to use when creating and implementing abstractions
  • Explore different ways to implement protocols in Clojure
  • Implement various design principles while working with the JVM
  • Write and compare plain functions and multimethods for transforming data
  • Analyze functions and abstractions for their performance and flexibility
  • Learn about common “gotchas” to avoid errors when writing code

Who this book is for

Clojure Polymorphism is useful for all programmers who want to leverage Clojure's polymorphic tools to build efficient applications. To get the most out of this book, you must be a moderately proficient Clojure programmer.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 33

Veröffentlichungsjahr: 2019

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Clojure Polymorphism

Leverage Clojure's polymorphic tools to develop your applications

Paul Stadig

Clojure Polymorphism

Copyright © 2019 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Author: Paul Stadig

Managing Editor: Ashish James

Acquisitions Editor: Karan Wadekar

Production Editor: Roshan Kawale

Editorial Board: Bharat Botle, Ewan Buckingham, Megan Carlisle, Simon Cox, Mahesh Dhyani, Manasa Kumar, Alex Mazonowicz, Dominic Pereira, Shiny Poojary, Abhishek Rane, Erol Staveley, Ankita Thakur, and Jonathan Wray

First Published: November 2019

Production Reference: 1141119

ISBN: 978-1-83898-236-2

Published by Packt Publishing Ltd.

Livery Place, 35 Livery Street

Birmingham B3 2PB, UK

Table of Contents

Preface   i

Introduction   v

Chapter 1: Polymorphism   1

Chapter 2: Service Abstraction   5

Plain Functions   6

Plain Functions + Client Namespace   8

Multimethods   10

Protocol   12

Protocol + Client Namespace   13

Protocol + Client Namespace + Multimethod   16

Analysis   18

Code Elasticity   18

Separation of Concerns   19

Dynamism   20

Summary   20

Chapter 3: Data Transformation   23

Analysis   25

Flexibility   25

Performance   25

External Integration   26

Cross-Platform Compatibility   27

Summary   27

Chapter 4: Miscellaneous JVM Considerations   29

Performance Gotcha   29

Semantic Gotcha   30

Summary   32

Conclusion   35

Preface

About

This section briefly introduces what this book covers.

About the Book

Clojure is a modern, dynamic language that you can use to develop robust, multithreaded programs. Clojure Polymorphism is a comprehensive guide that shows you how to use Clojure's features to your advantage.

The book begins by describing examples that show how to define and implement abstractions with plain functions and multimethods. Then you'll analyze these examples and separate the good and bad aspects of their design principles. You'll also learn how to perform data transformation abstraction with a plain function and discover how to write new cross-platform predicates while keeping the core of your abstraction free from reader conditionals. The later chapters explain the considerations to keep in mind when implementing Clojure protocols on the Java Virtual Machine (JVM).

By the end of this book, you'll know how to use the various polymorphic tools of Clojure to your advantage while designing your applications.

Learning Objectives

Explore how polymorphism is implemented in ClojureDiscover what design principles to use when creating and implementing abstractionsExplore different ways to implement protocols in ClojureImplement various design principles while working with the JVMWrite and compare plain functions and multimethods for transforming data Analyze functions and abstractions for their performance and flexibilityLearn about common "gotchas" to avoid errors when writing code

Audience

Clojure Polymorphism is useful for all programmers who want to leverage Clojure's polymorphic tools to build efficient applications. To get the most out of this book, you must be a moderately proficient Clojure programmer.

Approach

Clojure Polymorphism explains concepts by picking up a theme and talking about the tools Clojure provides for exploring that theme. Engaging examples are given in each case. Problems are solved using different tools, and the solutions are analyzed by separating the good and bad design principles.

Introduction

When it comes to Clojure (when I say Clojure, I am usually referring to both Clojure and ClojureScript. Sometimes I am referring only to JVM Clojure, but context should make it clear