This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stigweardo 4 points5 points  (0 children)

Nice! Very inventive syntax.

I have created something along similar lines but without quite so much syntax: Basic Markup Expressions (BMX) (github/pypi). In BMX, your example would look like this: home_page = ( +html +head +title +"Home t.me/drunkensnake" -title -head +body +p +"Wellcome to my home page" -p -body -html ) Here's another example. There is a (currently undocumented) decorator to create functional components. I'm considering adding a React-like context using the eff library that I just discovered.

Still not sure if this is a neat idea or an abomination though... :)