advancedresearch / avalog

An experimental implementation of Avatar Logic with a Prolog-like syntax
Apache License 2.0
66 stars 3 forks source link

Add namespaces #164

Open bvssvni opened 2 years ago

bvssvni commented 2 years ago

For example, when structuring data about ancient Egypt, I don't want to say explicitly that it is about ancient Egypt. However, when I combine this data with ancient Greece, there can be naming collisions.

bvssvni commented 2 years ago

Idea for syntax:

ns ancient_egypt {
  (::early_dynastic_period, before'(::old_kingdom_era))
}

This is equal to:

(ancient_egypt::early_dynastic_period, before'(ancient_egypt::old_kingdom_era))
bvssvni commented 2 years ago

An idea for use syntax:

use ancient_egypt::early_dynastic_period as edp

(edp::first_dynasty, ...)