Clojure for domain-specific languages : learn how to use Clojure language with examples and develop domain-specific languages on the go /
An example-oriented approach to develop custom domain-specific languages. If you've already developed a few Clojure applications and wish to expand your knowledge on Clojure or domain-specific languages in general, then this book is for you. If you're an absolute Clojure beginner, then you...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Pub.,
2013.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: An Overview of Domain-Specific Languages with Clojure; Domain-specific languages (DSL); Limited scope; Syntax; Using a DSL; Popular DSLs; A contract between language and domain; The language of trust; Internal versus External DSLs; External DSLs; Internal DSL; Clojure libraries; Characteristics of a Clojure library; The current state of Clojure libraries; Database domains; HTML domain; Formative; Hiccup; Mustache; Clostache; ECMA/JavaScript domain; ClojureScript.
- Comparing ClojureScript and JavaScriptAudio domain; Music-as-data; Overtone; Image domains; Summary; Chapter 2: Design Concepts with Clojure; Every function is a little program; A pure function; Floor to roof development; Each function only does one thing; Patterns for success; DRY; KISS; YAGNI; Writing Clojure; Spacing and alignment; Syntax; Name conventions; Collection types; Summary; Chapter 3: Clojure Editing and Project Creation; The origin of Emacs and its usage; Installing and setting up Emacs24; Setting up Emacs; Creating and editing CLJ files in Emacs.
- Running a Clojure REPL inside EmacsThe nrepl.el Emacs extension; Leiningen and project management; Installing Leiningen and starting a project; Including Clojure or Java libraries in your project; Compiling your project to a Java JAR; Leiningen; Summary; Chapter 4: Features, Functions, and Macros; Namespaces; Java inside Clojure; Immutability; Dynamic objects; Metadata; Lazy sequences; Destructuring; Functions and arity; Anonymous functions; Macros; Summary; Chapter 5: Collections and Sequencing; Collections; Collections by example; Vectors; Vectors by example; Lists; Lists by example; Maps.
- Maps by exampleSets; Sets by example; Sequences; Sequences by example; :let, :while, and :when; Summary; Chapter 6: Assignment and Concurrency; Variables; Transients; Atoms; Agents; Refs; Futures; Promises; Summary; Chapter 7: Flow Control, Error Handling, and Math; Flow control; Object comparison; Casting; Error handling; Arithmetic; Addition and subtraction; Multiplication; Division; Remainder and modulus; Increment and decrement; Greatest and least values; Equality; Summary; Chapter 8: Methods for Abstraction; Creating and constructing classes.
- Creating interfaces and implementing them with deftypeUsing records, protocols, and type extensions; Overriding methods with reify and proxy; Working with reify; Implementing interface methods with proxy; Custom symbol definitions with macros; Definitions using records; Making definitions using proxy; Making definitions using deftype; Multimethod polymorphism; Creating the Bottle and Customer classes; Testing the customer-drink methods; Relationships with hierarchies; Resolving parent relationship conflicts; Assertion testing with metadata; Input constraints with :pre.