Announcement: Genyris Language

An implementation of this little language is now available. Genyris is a Lisp derivative with classes which allows an object to belong to multiple classes at once. (This is not multiple inheritance - each object has not just one class but a set of them.) Anything can be "tagged" as a member of a class (including cons cells, atoms). Once tagged, programmers can use OO-style methods, inheritance etc to play with the objects. The goal is to align the language with the world of RDF and OWL. This is a not an academic creation and makes no claims for originality - but it might amuse. If you like it please let me know.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I like the syntax

I like the way you have managed to give a simple and consistant
syntax to sexp, Particularly the fact that I can collapse the syntax
to one line sexp if needed.
Given that it looks so close to scheme, would it be possible
(or do you have plans) to use libraries from scheme into your language?

Libraries for Genyris

This is a good question. On the one hand a port of the scheme libraries which would give backward compatability. The downside is this will not explore the multi-class paradigm.
Another factor is the language is a real language for use in corporate day-jobs - in which case Java class library integration is a bonus. This is harder but will force more work with the new paradigm. The likelyhood is there will be new Genyris libraries which wrap existing Java class libraries for things like networking. It will be interesting to see how list-manipulation libraries pan out.

For example implementing sets as lists in Genyris would probably take the form of Pairs tagged as Sets and calls to methods. ie Instead of

define my-set '(a b c) ; Scheme style
element-of-set? x my-set

you would have

tag Set (define my-set '(a b c)) ; Genyris style
my-set (_element-of-set? x)

Genyris supports both styles - the answer will come with time.

on genericity/ies?

From the tutorial:

A major goal of the Genyris language is to encourage re-use and generic programming.

Might I ask a favour of you, to compare/contrast a little bit with other language's approaches to generic programming (Java generics, Java polymorphism, C++ generics, Scala's set of things to allow "real" componentization/re-use, that kind of thing)? Thank you.

Re: on genericity/ies

My experience includes C++ templates, Java, Python, Lisp, UNIX shell. Curiously I find that the last of these promotes most re-use. The simplicity of a chain of UNIX filters is hard to surpass. A suite of unconnected filter programs can be plugged togther in a lego-like chain is attractive. How is it that these ancient programs are a more readily re-used that later structured OO environments like Java? Java and C++ re-use seems difficult for most organisations I have experienced.

The answer lies in structural sub-typing. UNIX filters typically assume a line-based record with white-space separated fields. The programs use the structure of the input data (there are no nominative type definitions or meta-data). Another example - Text editors are able to manipulate thousand of file formats since they all inherit the ubiquitous line-based ASCII format. Whe we tag an input file with a file extension, they are able to provide syntax highlighting etc.

So with Genyris, the aim is to ever-so-slightly formalise the identification of 'generic' data types. The developer builds code which does not force the structure, rather the code is designed to work with pre-existing structures. There is emphasis in Genyris on 1. correctly idenifying the structure of an object and 2. tagging the object with that information 3. using libraries of generic code which hande that class.

Genyris is being designed with one eye on the world of OWL and Decription Logics. This theory allows classes to be defined with a more passive, non prescribing definition of structure. Unlike (say) Java where all objects of a certain class have a rigidly defined construction process, in Genyris the aim is to allow external programs to be responsible for construction, Genyris should recognise the structures for the programmer and allow the generic libraries to be brought to bear.

Ultimately the aim is to ship Genyris witha comprehensive class libraries for most data types which can be used by simply tagging incoming structures with the relevant class.

thanks for the notes

as a usually static-typing fan-boy, it is good to think about things which go different routes :-)

question: if it makes people want to reuse more, does it also handle debugging as well as other approaches which might maybe perhaps be more about 'correct by construction'?

benefits of "tagging"

What benefits does a "tag"-based OO system have over traditional methods, like class-based OO, Haskell type classes, etc.?

I'll give it a try...

I'll give it a try and let you know...

talk soon,

My blog

srfi 49?

Did you use srfi 49 as inspiration?