O'Reilly logo

Clojure for Domain-specific Languages by Kelker Ryan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Methods for Abstraction

This chapter starts off with an explanation of the classes we need to make for the multimethod polymorphism tutorial. By the end of this chapter, you should be familiar with making classes, polymorphic functions, and your own data types.

This chapter will cover:

  • Creating and constructing classes
  • Overriding methods
  • Multimethod polymorphism
  • Custom data types
  • Parent and child relationships

Creating and constructing classes

This section focuses on implementing Clojure-defined interfaces and creating classes. After covering interfaces, you'll learn how to make classes with and without class-specific methods.

Creating interfaces and implementing them with deftype

Interfaces in Clojure can be created using definterface. Just ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required