Hacker News new | ask | show | jobs
by fjfaase 1613 days ago
A programming language that is based on values including values where the components can have references to other components. Such a programming language should also have cursors that point to parts of a value and can be used to modify a part of the value that they belong to. Preferable there should also be transactions on values and values with a (undo/redo) history.

Having a lot of experience with programming in C++. C# and JavaScript, I have found that many 'creepy' bugs are related to the confusion arising from assigning an object to some member, where a copy is intended, or the otherway around, that a copy is made where a reference is intended. I have not yet come across a language where this is solved and have started working on such a language myself: https://github.com/FransFaase/DataLang

1 comments

Have you looked at Clojure?
I just did. I did not find anything on compound values where the components can have references to other components with in the compound value. Maybe I did not look good enough. I also would like to have integrity requirements on references such as FOREING KEY constraints with cascaded delete in Relational databases. I also would like to have transactions like those in databases.

I am surprised that there are still no software development platforms where you use one language for all levels and do not have to translate between different ways of representing data and interacting with services.

The interesting applications are where multiple agents (people and/or other systems) are working on the same data. The methods to define such forms of cooperation are rather primitive. On one hand you have the databases with their transactions and pessimistic locking approaches. On the other hand you have git repositories with optimistic locking and manual merging. Sometimes you would like to have something in the middle, where you can define which operations conflict (do not commute) and how to deal with them.

>> I am surprised that there are still no software development platforms where you use one language for all levels and do not have to translate between different ways of representing data and interacting with services.

You've spotted a problem that I think many people are blind to. I agree 100%.

If you'd like to explore more about Clojure, I highly recommend this talk https://www.youtube.com/watch?v=ScEPu1cs4l0