News for hackers. Stuff that matters.
Re:Making Coffeescript’s Whitespace More Significant by raganwald on Wednesday November 30, 2011 @02:49PM (#3296556)
Great point:

    This whitespace zig-zaging is barely readable.
I considered an example like this in the post, but it confuses accidental with essential complexity. If you’re going to do all of that, then I suggest that significant indentation is a win over everything being a chain and using something like jQuery’s `.end()` to discriminate chaining from cascading.

It’s a lot easier to spot an error in indentation than a missing `.end()`. That being said... This could be a false dichotomy. Perhaps the right thing to do is use named temporary variables or structure the code another way.

Although I don’t see a ton of it in the wild, it’s 100% valid to write your own custom jQuery traversals, filters, and so forth. my own jQuery Combinators includes `.K` and `.T` combinators so that you can break code up into functions so you don’t need to write elaborate trees.

So... I agree that an elaborate tree is a difficult problem to handle, and perhaps neither significant whitespace nor `.end()` is the answer. But for the limited and possibly artificial choice of a fluent interface OR significant whitespace, I prefer significant whitespace.

Re:Making Coffeescript’s Whitespace More Significant by itmag on Thursday December 01, 2011 @03:25AM (#3298850)
"Although I don’t see a ton of it in the wild, it’s 100% valid to write your own custom jQuery traversals, filters, and so forth. my own jQuery Combinators includes `.K` and `.T` combinators so that you can break code up into functions so you don’t need to write elaborate trees."

This is very interesting to me. Tell me more :)

Re:Making Coffeescript’s Whitespace More Significant by raganwald on Thursday December 01, 2011 @10:39AM (#3300076)