4 ms·
They both abstract the programmer from what's actually being produced and I can't help thinking that this is a bad thing. I'm currently maintaining/developing
by hopeless 15y ago
They both abstract the programmer from what's actually being produced and I can't help thinking that this is a bad thing.
I'm currently maintaining/developing on a 10yo Java project which contains a mix of JSP pages and ECS^-generated HTML in servlets. Which one is easier to maintain? The JSP pages by a mile because there is a direct correspondence between the source and the output. The ECS-generated HTML is totally obscured within the Java code.
So while HAML and SASS (to a lesser extent due to the similar syntax) abstract us programmer from the limitations of HTML & CSS, I can't help feeling that they will create huge maintenance headaches for our future-selves. Will anyone actually know HAML in 5-10years time? So, suck it up and use ERB and keep your abstractions as close to Earth as possible.
^ Apache ECS (now EOL'd) lets you build the HTML tree as nested Java objects.
- mbleigh 15y agoAnother reason I love SASS: since it compiles directly into CSS, if we all forget how to read SASS we can always just start modifying the resultant CSS instead. HAML on the other hand does not compile into ERB.
- hopeless 15y agoGreat point! I'd forgotten that about SASS.
- fbuilesv 15y agoThe phrase "abstract the programmer from what's actually being produced and I can't help thinking that this is a bad thing" sounds weird given the fact that you're using Java, a technology that also abstracts some of the underlying capabilities of the C/ASM system you're using. Abstraction itself is not bad thing. Knowing that a lot of the technologies that we're using today will be obsolete in 10 years is not a good enough reason to stop trying new things.
- hopeless 15y agoWe don't write 1's and 0's. Programming is an abstraction. But we still need to pick and choose what abstractions we use and where. Do the benefits of that abstraction outweigh the problems it creates? In the case of HAML (and ECS, grrr...) I don't think it does.
- grimen 15y agoYou can convert HAML/SASS 1:1 anytime, so the "maintenance headaches" argument is not a valid one.