News for hackers. Stuff that matters.
Re:Buzz: An Extensible Programming Language for Self-Organiz... by sklogic on Thursday July 30, 2015 @08:51AM (#9974524)
API leaks abstractions and does not provide any domain-specific semantics. Imagine an API for, say, parsing. A DSL would have a nice BNF-like syntax and abstract any implementation details away. API - well, you won't ever get any further than Parsec, and Parsec is awful.
Re:Buzz: An Extensible Programming Language for Self-Organiz... by TeMPOraL on Thursday July 30, 2015 @09:12AM (#9974651)
> A DSL would have a nice BNF-like syntax and abstract any implementation details away.

Use powerful enough language.

https://en.wikibooks.org/wiki/Common_Lisp/External_libraries...

Here, you can pretty much write out your BNF directly and get a parser out of it.

Re:Buzz: An Extensible Programming Language for Self-Organiz... by sklogic on Thursday July 30, 2015 @11:48AM (#9975784)
That's exactly the approach I'm preaching. I've built entire layers of languages above Lisp using this kind of eDSLs: https://github.com/combinatorylogic/mbase

So, yes, as long as you have a sufficiently powerful meta-language, eDSL is almost always better than a library. But yet, if your language is not powerful at all, DSLs (standalone) are still better then the libraries, they're just a bit more complicated to implement.

Re:Buzz: An Extensible Programming Language for Self-Organiz... by eutectic on Thursday July 30, 2015 @08:56AM (#9974550)
What do you have against parsec?
Re:Buzz: An Extensible Programming Language for Self-Organiz... by sklogic on Thursday July 30, 2015 @05:30PM (#9978298)
Same thing - leaky abstraction. Too much host language semantics leaking into the problem domain. It's not a pure BNF, and therefore it's faulty by design.