Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But it's almost a general-purpose language, so why not just use one? I'm still not seeing why a DSL was necessary or helpful.


> But it's almost a general-purpose language, so why not just use one?

The usefulness of not being a general-purpose language it that it makes static analysis very good; that's what made the BCL-based tooling so useful: being able to easily diff two versions of the same module (a tool called UBdiff), compute the transitive closure of a module's dependencies, trace the execution of BCL code and correlate it with the AST, to point out where an error comes from.

All these features were either unavailable or took years to develop for Piccolo, because Piccolo was based on Python.

> I'm still not seeing why a DSL was necessary or helpful.

BCL has distinct evaluation rules and a notation that encodes many patterns that SREs used for defining services, and that made BCL code much more compact and easy to ready than all the alternatives.

BCL was designed to be unidirectional: a module was evaluated locally, and the result sent to the Borgmaster. Compare that to Terraform, whose execution model consists of an execution tree where some nodes come from RPCs, meaning that it's not generally possible to statically analyse a TF module, because some errors can come from from feeding RPC results into new RPCs, and execution often fails after tens of minutes. All very janky.


Thanks for the detailed explanation. I get the appeal of this then, I just don't think it's worth. Whatever you do will produce some static proto in the end that can be diffed at least. General lang benefits from everyone understanding it and all the standard debug/test methods applying, which I'd much rather have than easier static analysis of the dynamic part. And yeah I was uninformed on Google's config langs, but so was my entire team for 7 years, all cargo-culting.

You're saying the general lang approach led to Piccolo, but that was still a DSL. It looked sorta like Python but it's not, you don't even call functions the normal way, and tons of magic stuff is happening, so just GCL/BCL except worse for the reasons you said. But they must've had a reason to try it. Seeing them continue changing around and making new languages says it's not just me, nothing is working well enough to stick. SREs weren't just arguing about which is better, they were asserting X is deprecated in favor of Y.

TF has seemingly stuck outside. I'm still not a fan of that being a DSL, but at least it's one tons of people use and now Claude can easily handle.


> General lang benefits from everyone understanding it and all the standard debug/test methods applying, which I'd much rather have than easier static analysis of the dynamic part.

Perhaps. I consider that a very narrow view that's detrimental on the long term.

> But they must've had a reason to try it.

They were obsessed with using a general-purpose language, and Python was the thing they knew.

> SREs weren't just arguing about which is better, they were asserting X is deprecated in favor of Y.

This is a kind of dishonesty I saw a lot at Google.

> TF has seemingly stuck outside. I'm still not a fan of that being a DSL, but at least it's one tons of people use and now Claude can easily handle.

Unfortunately Terraform still has significant flaws that prevent it from being used in a reliable fashion.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: