Hacker News new | ask | show | jobs
by swordfish0321 4614 days ago
Not sure what you mean by "future-looking functionality". I don't know anything about TypeScript but CoffeeScript is just an opinionated way to generate JavaScript. Isn't that what both LESS and SASS do for CSS? Regarding grid or flexbox, that is ultimately a design decision/preference of the architect.

So using your example, if SASS inherently used grid that would be like CoffeeScript introducing MVC into your project.

1 comments

TypeScript adds some features planned for Javascript such as classes with inheritance and modules. The thinking is that when these features become standardized your TypeScript code will be valid Javascript. (Or at least as far as those features are concerned.) So in the same vein, why doesn't SASS provide the next generation of CSS functionality? That is, you use the proposed syntax for CSS grids and it transforms that into whatever mess is necessary to emulate it in today's CSS. Later when CSS grid support is available no translation is necessary.

I suppose the answer is because it can't do so in CSS alone and that emulating CSS Grid would require CSS, DOM, and Javascript to be emitted from the compiled SASS script. It would be neat if someone who knew more could confirm my suspicion.

I'm not sure I follow your example regarding CoffeeScript and MVC.