Open michaelleejl opened 2 years ago
1.right i agree, maybe something like light1: new PhillipsHue()
might work better?
2.(and 3.) i also agree with this, looking back. I quite like the isA syntax, disambiguates the tags p well. My only concern with the positional tags/annotations is, would this be straying away from the YAML syntax too much?
4.Honestly, i didnt rly think about this v hard when writing the syntax, but i do think its an important thing to consider. if were allowing files to be separated or combined, i thought imports would work like in python, where you can essentially import any python file into another w/o any explicit export statements? but am open to other ideas as well
I like the home.pyot syntax as it stands, but a couple of things I think are worth considering.
I've sorted the issues in descending order of severity.
light1: PhillipsHue()
is no different from naming a space,Room1:
. That to me seems like poor design.#Home{ #Room1{} }
, then anything with the#Room1
tag must also have the#Home
.light1: PhillipsHue() isA #discoLight
. This keyword would be a suffix, while all positional tags would be prefixes - so#Home{ #Room1{ light1 = new PhillipsHue() isA #discoLight } }
. We might consider establishing an explicit syntactic difference between a positional tag and a functional tag.@riamundhra02 please let me know your thoughts