by iainmerrick · 9y ago · 0 comments
Children: none
Opinions: none
That certainly looks pleasant and human-readable, but a bit of a nightmare to interpret! Couldn't it just as well be "Children: 0" or "Children: []"? If the idea is to let non-technical people edit configuration files, the code reading the file will have to be very flexible and forgiving.(Edit to add: maybe that's something you mostly get for free in REBOL? It would be a major headache in most other languages though)
The language concept is a bit more fundamental than config files. Rebol (and Ren-C and cousin Red) is a fully homoiconic language that itself has tools for parsing and interpreting DSLs ('Dialects' to use the language's nomenclature) that use the same language rules. In essence you do indeed get the lexer for free.
Would recommend a wee read of: http://blog.hostilefork.com/why-rebol-red-parse-cool/
I've argued that Ren is somewhat redundant as it fills the same space that Rebol does though Rebol lacks a formal specification at this time.
'unknown' is almost like saying "We don't know what should be here", while 'none' is closer to saying "We didn't get passed any information here".
Ultimately, I feel like 'unknown' is more specific, it conveys intent beyond that of 'none'. Such as, it could imply we actually don't know what kind of data 'Opinions' should hold, rather than that there merely happens to be no data to put there.
Cookies in the jar: none
and
Cookies in the jar: unknown