Alternative syntax for Rholang  


Davi Post
New Member
Joined:8 months  ago
Posts: 1
26/05/2018 2:34 am  

Hello Rholang enthusiasts --

I've been experimenting with an alternative syntax for Rholang. I think it is cleaner and easier to read and write, especially for programmers unfamiliar with process calculus or Scala.

(I'm trying to post an example here, but the Code button destroys the indenting.)

You can see examples at

The *.rho2 files are the alternative syntax. They were translated from the *.rho versions with my Modsplan compiler (using the specifications in modspecs/rho.*). The file rho2.syntax is a Modsplan syntax for rho2. The rho2 examples have been parsed with this to produce parse trees (*.tree files).

One simplification I've made in rho2 is to remove the dereference (*x) and quote (@P) operators. I think the conversions can be done automatically based on context. If this works, it could eliminate confusion for programmers new to Rholang.

Thanks to Jake for his Rchain Collaborative Learning sessions, which inspired this work.


Mike Stay
Member Moderator
Joined:9 months  ago
Posts: 19
31/05/2018 9:24 pm  

Hi, Davi.  We at Pyrofex proposed a syntax very similar to this to Greg, but he preferred the one we currently have.  In Venus, we intend to make available some language tools that would allow people to define their own syntax, so you'll likely be able to write your code that way if you want.


Please Login or Register