IMO, those links are too theoretical and you most probably need domain 
knowledge and actual use cases to know the best data structures to represent 
Frames.

Looking around you can probably re-use OO techniques though: 
[https://en.wikipedia.org/wiki/Frame_language#Comparison_of_frames_and_objects](https://en.wikipedia.org/wiki/Frame_language#Comparison_of_frames_and_objects).

Couple of notes:

  * Your proposal will be bottlenecked by string processing, at least `typ` 
should be an enum
  * `ptr Frame` should be just Frame as Frame is a ref object.
  * I don't know the associated procs/use-cases but all those heap allocations 
will lead to memory fragmentation, bad memory locality and poor performance if 
you need to create/destroy Frames in tight loop.
  * That Frames theory seems to heavily suffer from the [curse of 
dimensionality](https://en.wikipedia.org/wiki/Curse_of_dimensionality)



My advice to go forward:

  * define what a minimal proof-of-concept should be able to do
  * implement it
  * refine the base data structure so that building that use-case from that 
data structure is easy.
  * add new use-cases, rinse-and-repeat.



Check performance from time to time on non-toy inputs.

Reply via email to