Red/System draft specifications released

I have published yesterday the first draft of Red/System’s specifications. It is amazing how much time and energy writing such formal description can take. It is a working draft, so expect it to be updated often during next weeks. The document source is in MakeDoc format and stored on github, so feel free to fix typos and errors directly there.

As all features in the specifications are not yet implemented (I would say 85% is already done), I have added a todo-list on github’s wiki to track the missing parts.

Also, all features are not yet set in stone, there are still a few important design decisions to take in the next weeks:

  • Pointer! datatype: should we keep it or consider that struct! datatype can do the same job, so it’s not worth the trouble of supporting an additional type for the syntactic sugar’ Let’s take an example with a pointer on integer and struct having a single integer member:
p: &[integer! 0]
p/value: 123

p: struct [value [integer!]]
p/value: 123

Looks pretty much the same. Pointers have a shorter literal form, but once declared, structs could be used the same way and replace pointers in all use-cases.

  • Array!: will it be necessary to add a standalone array! datatype or could its semantics be simply added to struct! or pointer! (if finally kept)’
  • Booleans: there’s currently no true/false support in Red/System, so that boolean values are not first class (can’t be assigned nor passed as argument). This is quite limiting the expressibility of the language. Is using simple integer values (0,1 or 0,-1) enough or will it be better to support it as a separate datatype (logic!)’

The answers to these questions will come while working on unit tests and coding Red’s runtime (written in Red/System). Feel free to share your thoughts about these features here, in comments, or on Google groups.