Hacker News new | ask | show | jobs
by Noe2097 1355 days ago
Why going for CSS as a syntactical starting point, if it is to change it so fundamentally that no IDE or existing tools will be able to handle it, and if it is to move away from its "theoretical" purpose of describing style independently from content?

Going that way, there are so many (existing) possibilities. Want something that looks like CSS but that has more structure? Use YAML. Preferring braces over spaces to delimit blocks, but don't fancy quotes everywhere? Use Groovy -- you will even be able to write a DSL to generate SVG in an afternoon, with the entire power of the JVM. Don't want anything executable? Forbid it. Refrain from picking a syntax that are not fitting your needs and for a language whose intent is different, you will just call for confusion

2 comments

I respectfully disagree. I think it's really nice when a new language reuses existing syntax and allows me to make use of my existing mental structures.

As an example, I love it that json is like js, and that js is a bit like C. Even when there are inevitable "false friends" in any new language, it's so nice to have that starting advantage.

From the second section of the article, appropriately titled CSS Syntax:

> What I love about CSS is its readability. There are no unnecessary quotes around property values even when separated by spaces. And the CSS code always expands from top to bottom if following best practices.