Alternative syntax for Rholang  

  RSS

Davi Post
(@davipo)
New Member
Joined:3 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  https://github.com/davipo/modsplan-compiler/tree/rholang/rholang

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.

--Davi


ReplyQuote
Mike Stay
(@stay)
Member Moderator
Joined:4 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.


ReplyQuote
  
Working

Please Login or Register