seph

 

Language

Page history last edited by Joseph Gentle 1 yr ago

I want to design my own visual programming language. Nobody has gotten these right yet; and I think thats a shame.

 

There's a bunch of things I want my language to support:

 

Object Persistance

 

Objects should, by default, persist. I am bored of rewriting code to save and load my user's data.

 

Weak typing + constraints

 

I really like Python / Javascript / etc style duck typing. I like being able to add any arbitrary property I want to an object. You will never be able to think of all the uses / all the data you will want objects to have a priori. Let the user / program add data as it needs to.

 

You can implement a fast compiler for this sort of thing by following Google's lead with their V8 javascript engine. In particular, these design documents show how they implemented a fast native code compiler for javascript.

 

The problem of course is that you can make mistakes that the compiler won't detect until run-time. To solve this, I want to write a constraints-based system.

 

Say you have a function like this:

 

func (x):
        confabulate(x.foo)
        listerine(x.bar)

 

This function obviously requires x to have properties 'foo' and 'bar'. As you write this, the editor should notice and add these constraints to the function:

 

func (x has x.foo, x.bar):
        confabulate(x.foo)
        listerine(x.bar)

 

There - now the function is somewhat type safe. I might also have a type:

 

fubar:
     any object x which has x.foo and x.bar

 

Now my runtime system can recommend maybe I want the constraint 'x is a fubar' instead of the longer 'x has x.foo, x.bar'

 

Pluggable visual design elements

 

Some design elements should be visually represented. When I'm talking about a projection, I want to see a picture.

 

Network Protocol

 

All the RPC documents have these awesome packet diagrams and stuff. Why can't I drop that diagram into my program? If thats the data I'm describing, don't make me linearise it in a text window.

 

Finite State Machines

 

Some programming elements are best described by FSMs. Show me the state diagrams!

 

Programming by example

 

When you write a function or something, write some examples (and expected output) of the function. Its good documentation and its great testing code.

 

If the programmer is lazy, these can be generated from early programmatic testing. Just capture input to the function and output.

 

This guy shows some ideas on how it can be done: www.subtextual.org

 

 

Transactional memory model

 

I don't like locks. I think we can do a lot better

 

 

Code Is Data

 

Just like Python, .NET and Ruby, my code is data too and I want to be able to inspect it with other programs. I want to be able to apply metadata to functions, etc.

 

Streams

 

I wish I could find the link; but - there's some great concurrency / etc problems you can solve using object streams.

 

 

Relationships / Tags

 

I want to be able to relate objects with relationships (which are in effect, other objects). If an object x obeys a particular constraint y you could say 'x obeys y'. If an object car has a property wheel you could say 'car has-a wheel'. Etc.

 

Comments (0)

You don't have permission to comment on this page.