Hacker News new | ask | show | jobs
by bitexploder 605 days ago
Disclaimer: this is a neat project.

DSLs are such a trap for most projects that think they need them. Use lua or something off the shelf for scripting.

CEL exists for Go and (safely) solves many of the problems you might also want a DSL for.

The case for DSLs is often hard to justify in a project that has to be maintained for years.

3 comments

CEL seems very much in line with the Golang ideology. It looks like CEL doesn't really have any upsides at all, except for being non-turing-complete. It looks like it is more of a convenience food, for people, for whom any other syntax than what they know from mainstream programming languages is "too adventurous" or "too foreign". As if they cannot be trusted to be able to cope with another syntax. This might even be true, considering the character of Golang itself, which was created as a dumbed down lowest common denominator of several mainstream languages, so that everyone gets it. It was even missing generics for a long time, deeming them to be too complicated.

As a DSL CEL is kinda pointless, since it does not create any additional convenience beyond the usual mainstream programming language syntax. It therefore leaves potential on the table, and as a tradeoff appeals to familiarity of syntax. As a configuration language it is usable, probably with reduced risk, compared to using Golang itself (no turing-completeness!).

I don't think it actually appeals to anyone, who considers creating a DSL for a good reason.

You're missing the point of DSLs like CEL which is that they can easily be embedded. CEL is quite efficient and supports partial compilation and cost heuristics which makes it very cheap and easy to insert in a hot path that processes arbitrary customer data.
Yes, cel-go. But it is all the same expression language. It is used in a number of places in GCP for example. Attribute based ACLs, and such.
> CEL exists for Go and (safely) solves many of the problems you might also want a DSL for.

Seems like it would be difficult to use for what they are trying to achieve. Lua would be a better fit, however it is noted that they tried it first, but ran into some kind of issue with it. So now Limbo is among the "off the shelf" options.