3 ms·
We apparently have a very different definition of DSLs. Both jQuery and Lodash are, to me, libraries with lots of functions. A DSL, to me, would be a change in
by falcolas 10y ago
We apparently have a very different definition of DSLs. Both jQuery and Lodash are, to me, libraries with lots of functions. A DSL, to me, would be a change in the underlying language being interpreted.
i.e.
describe file("foo") do
it { should exist }
it { should be_owned_by "root" }
end
vs.
_.map(["a"], function(s) {alert(s)})
- qwer 10y agoExcept your rspec example isn't a change to the underlying language is it? Also, Check out mocha for the JavaScript equivalent. Also, when you use only one function of lodash, you can't call it a language, but there are chains and flows for creating powerful pipelines for collection processing.
- spion 10y agodescribe("something", () => { it(should(exist)) it(should(be_owned_by, "root")) }); Also _.map(["a"], s => alert(s)) Or just _.map(["a"], alert)