3 ms·
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 ex
by bitexploder 2y 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.
- kristianp 2y agoCEL seems to be for proto-buffers[1], not text? [1] https://github.com/google/cel-spec/blob/master/doc/intro.md https://github.com/google/cel-spec/blob/master/doc/intro.md CEL-go: https://github.com/google/cel-go https://github.com/google/cel-go
- bitexploder 2y agoYes, 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.
- __turbobrew__ 2y agoKubernetes too: https://kubernetes.io/docs/reference/using-api/cel/ https://kubernetes.io/docs/reference/using-api/cel/
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- zelphirkalt 2y agoCEL 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.
- xyzzy_plugh 2y agoYou'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.
- randomdata 2y ago> 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.