Re:Show HN: Preprocessor I've been working 4 years now
by mopires on Wednesday July 31, 2024 @12:40PM
(#41120767)
Shorthand definitions would be a good feature to be added, but it needs refinement. We need to think carefully about how to implement in a way that would fit gracefully with the syntax and with the developer experience.
Re:Show HN: Preprocessor I've been working 4 years now
by mopires on Wednesday July 31, 2024 @12:43PM
(#41120798)
Also, if we remove closing markup, the only way to understand if a markup is closed woud be by checking if a new markup is open. That doesn`t seem efficient.
Re:Show HN: Preprocessor I've been working 4 years now
by h0l0cube on Monday August 05, 2024 @02:09AM
(#41158522)
I guess pug's whitespace sensitivity permits a way to quickly tell if a tag is closed.
I'm a fan of higher expressiveness/minimalism, so perhaps I'm just biased in my preference, but I also appreciate how it removes the need to know/care about the inconsistent closing tag semantics of html.
The shorthand for classes/IDs seems like a good idea too, if there's a way to do it that improves readability (and seems less magical to the unfamiliar coder)