[RFC] Standard RPL Library Refactoring
Created by: Veratil
Proposal
Separate the RPL library definitions into a collection of namespaces for easier use and clarity of identifiers.
Solution
Rework the current rpl files into descriptive filenames and identifiers with namespace prefixes. Namespaces are to be short names of high level collections.
Currently we have the files:
basic.rpl
common.rpl
csv1.rpl
csv.rpl
datetime.rpl
json.rpl
network.rpl
rfc3986.rpl (URI-exact matching over generic network.rpl)
spark.rpl
along with a few others (grep.rpl, language-comments.rpl, rosie.rpl, rpl-1.0.rpl, rpl-1.1.rpl
). These all define a variety of identifiers with and without namespace prefixes.
These files will be reworked into namespaces such as: net
, date
, time
, num
, str
, etc.
-
network.rpl
will be refined into thenet
namespace. -
rfc3986.rpl
will be merged under thenet
namespace. -
datetime.rpl
will be split intodate
andtime
namespaces,date
will contain the "datetime" matching types. -
common.rpl
will be split intonum
,str
, and whatever else namespaces. -
csv[1].rpl
,json.rpl
,spark.rpl
can be put under alang
namespace to further separate identifiers. - Any languages can be put under their own
lang.[name]
namespace, such aslang.c
,lang.json
,lang.spark
, etc.
Namespace Patterns
core This is global namespace
net
str
num
os
lang
date
time
datetime Future implementation dependent on import