TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Haml-inspired mini-language for jQuery: Jabs

43 点作者 collint超过 15 年前

4 条评论

tdavis超过 15 年前
I've yet to find a considerable value-add in Haml. With Sass the value is pretty clear -- CSS can benefit from having variables and functions to make scripts more reusable and easier to manage. As a Python user I'm a lover of significant whitespace, but with the ability to have my text editor auto-complete tags it isn't worth it to learn a new DSL just to save on some brackets.<p>With Jabs it's even harder for me to see the value; I'm required to learn a new syntax in order to remove some braces and add implied variables. The $ selector for instance removes all of four characters, two of which could be added automatically, if that's your thing. jQuery itself is already a rather terse library and with Jabs I'm adding yet another layer of abstraction and the need for compilation to writing JS.<p>The code is also harder to parse (for me) as a result of all the implicit variables. I suppose that isn't of much concern if you're just using it to write your own JS and nobody ever has to look at it, though. The ability (and probably frequent need) to mix JS and Jabs only creates a larger mess, I would imagine.
评论 #968363 未加载
评论 #968348 未加载
crayz超过 15 年前
And ruby's manifest destiny continues<p>Your current language is too ugly or verbose? There's a ruby DSL for that
评论 #968369 未加载
评论 #968566 未加载
collint超过 15 年前
I just recorded a screencast showing a quick example coding session for Jabs <a href="http://www.youtube.com/watch?v=JdnXJ6bj_qs" rel="nofollow">http://www.youtube.com/watch?v=JdnXJ6bj_qs</a>
评论 #968745 未加载
csmeder超过 15 年前
Nice work!