5 ms·
This post is a great example of what I dislike about Ruby culture, making a big deal out of pretty simple stuff. At least the article didn't mention DSLs. This
by edw 15y ago
This post is a great example of what I dislike about Ruby culture, making a big deal out of pretty simple stuff. At least the article didn't mention DSLs.
This SASS thing, it seems interesting… I'm a Scheme programmer. I'd like something like it. After about forty-five minutes of hacking, I came up with this:
https://gist.github.com/956113 https://gist.github.com/956113
It lets you write code like this:
(make-css
'(("body.loading"
(font-size "12px")
(color "#fff")
(" ul#sidenav"
(" li"
(blah "blah"))))))
And generates output like this:
body.loading { font-size: 12px; color: #fff; }
body.loading ul#sidenav li { blah: blah; }
I agree with the guy's point though: SASS is different from HAML in that it actually does something conceptually useful, viz. it introduces a scope-like concept to CSS.
- drdaeman 15y agoI'd disagree - HAML adds syntax sugar. While it can be considered bad (there are some very valid criticisms), it certainly can't be considered conceptually useless.
- edw 15y agoI know nearly nothing about HAML, but if it's "just" syntactic sugar, then I'll stand by my statement that it's conceptually useless. Or maybe conceptually barren. HAML can very well be useful without introducing any new concepts. It's obviously more concise which i can see justifying its existence if for no other reason.
- grimen 15y agoWould be cool to benchmark this. Me with HAML/SASS vs. you guys with HTML/CSS. Points given for implmentation time and output validity and semantic quality. A few years ago Ruby was syntetic sugar, later Rails, later HAML/SASS. Give me a break.
- edw 15y ago1. It was the Java people who pooh-poohed Rails. The rest of us just got to work cloning it, sans any issues we had with it, in our favorite languages. I haven't seriously programmed in Java for almost ten years. 2. Syntactic sugar isn't just hand-waving; it has a reasonably-concrete definition. And it's generally considered acceptable if it delivers enough convenience (The concept of enough, you will find, is highly subjective.) 3. No one in this exchange has busted on the utility of SASS, so I don't understand why you'd deny anyone a SASS-like tool in a cage match nerd bake-off. For that matter, no one has busted on the practical utility of HAML in this exchange, just on the absence of new concepts i.e. powers of abstraction.
- grimen 15y ago1. The pointer was "many developers was hating on it" - I didn't say everytime it is the same people. You kow that, this bullet was just waste of characters really. 2. Reference me the official definition. Another point that didn't add anything to the discussion. 3. SASS been heavily hatred on in the past, Google it. Practical utility: Inofficially 80% of Rails/Sinatra developers use HAML - why? Because it makes people productive.
- edw 15y agoHey guys, I was thinking about my implementation of Sass (apparently, it's not supposed to be in all caps) and came to the conclusion that it's not simple enough. I wrote a version that obviates the need for a bunch of the parentheses. You can check it out here: https://gist.github.com/957123 https://gist.github.com/957123 The example above can now be written thusly: (make-css '(("body.loading" font-size "12px" color "#fff" (" ul#sidenav" (" li" blah "blah"))))) Have a nice day!