3 ms·
The most useful construct I am aware of that I wish became more popular in backend languages is strongly typed tree literals. (Introduced by Meta in Hack as "XH
by YouWhy 3y ago
The most useful construct I am aware of that I wish became more popular in backend languages is strongly typed tree literals. (Introduced by Meta in Hack as "XHP")
Consider this pseudocode expression:
:Div{Hello :Span(style='bold'){world}} # expression type: HTMLDOMNode.Div
This is immensely powerful and saves a ton of time/bugs especially when compared to the alternative of string interpolation.
I know somebody once did XHP on Python, but regrettably this work was abandoned.