• Stars
    star
    17
  • Rank 1,257,181 (Top 25 %)
  • Language
    Racket
  • License
    MIT License
  • Created almost 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generic Little System

gls

GLS - Generic Little (Object, Type, Anything, ...) System

It provides multiple dispatch for Racket.

Differences from Swindle:

  • Doesn't force you to change all. GLS is a small collection with a dozen of functions in API. It only adds generic functions.

  • It based upon types, not classes. You may dispatch you function on any predicate you may imagine: exact-integer?, (real-in 0 10), (and? stream? (not/c stream-empty?)), ...

GLS is based on Greg Sullivan's GLOS, that was witten for scheme48. It has the same API, but without implemetation of own object system (glos-records). So GLS is not "generic little object system", but simply "generic little system". But I added support for racket/class: you may use class instead of type predicate and GLS correctly supports subtypes (subclasses).

Sorry for bad documentation: for API look into main.rkt, for examples of use -- test.rkt.

Some description of GLOS is in the paper ref-dyn-patterns.

Also, slides in proglangsandsofteng work through some examples using GLOS.