Git Product home page Git Product logo

writing-dsls's Introduction

Writing Domain Specific Languages

Presented at:

  • Functional Swift Conference - Brooklyn, NY 2017
  • Mobiconf - Krakow, Poland 2017

Video

Writing Domain Specific Languages - Functional Swift 2017

Writing Domain Specific Languages - Functional Swift 2017

Abstract

A Domain Specific Language (DSL) is a computer programming language of limited expressiveness focused on a particular domain. Most languages you hear of are General Purpose Languages, which can handle most things you run into during a software project. Each DSL can only handle one specific aspect of a system.

Domain specific languages allow us to create an ideal environment for solving a specific problem. In this talk we’ll discuss how to use various language features like recursive enums, trailing closures and higher order functions to create elegant and type-safe domain specific languages.

We will go through real-world problems we encountered at Pinterest and will end by building a domain specific language for crafting type-safe GraphQL queries using the Github API.

Playground

The examples I covered in the presentation are all available as pages in the WritingDSLs playground.

Contents

  • Page 1: File Hierarchies
  • Page 2: Code Generation
  • Page 3: GraphQL queries with Github

Note: The GraphQL playground requires you to create your own access token for Github https://developer.github.com/early-access/graphql/guides/accessing-graphql/

Resources

writing-dsls's People

Contributors

rahul-malik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.