logoalt Hacker News

kevindamm12/09/20242 repliesview on HN

This appears to be the same language that started as a custom build rule DSL for bazel (and evolving from lessons learned in blaze's Python extension), the page positions it as a much more general-purpose embedded language.

I'm all for using the right tool for the job, and I'll acknowledge the benefits of hermeticity and parallelism in many contexts. But, I also think that you need to weigh the cost of adding another language to a project. I don't imagine myself using this anywhere outside of a build system, and even then I would first try to take the declarative rules of that build system as far as I can. It's probably better than shell scripts, though, at least most of the time? May depend on your team's prior familiarity with shell and/or love of Python.

There are three implementations (Go, Rust, Java) which could be a good thing if the language doesn't change often. They would have to be kept in sync for any changes, as well as keep from drifting due to changes in the host language's semantics.

I also think that the closeness in syntax with Python can be a disadvantage, especially if users are expecting more recent Python additions like the walrus operator or pattern matching to be available.

I like to design languages, too, so these comments come from a place of love and understanding. I think it would help if there were some more specific justification (or examples) of why this is better than something more established (e.g. Lua or MicroPython) or more distinct (e.g. pure data in configs instead of embedded code). I do like that the language attempts to remain as simple as needed.


Replies

yodsanklai12/09/2024

If I understand correctly, Starlark is a strict subset of Python (at least very close to Python). Can anything be more established than Python?

Also I don't think pure data is an option. The point is that you want to generate data, which has many benefits (avoid duplication, easier to test).

It seems that Starlark is a good trade-off given the constraints. My main grief is that it doesn't have type.

show 2 replies
foooorsyth12/09/2024

>There are three implementations (Go, Rust, Java)

There are so many people at Google just goofing around, lol. People just doing hobby stuff for $350k/year.

There is no justification to implement this custom dialect of Python for a build system that drives everyone crazy 3 times. Reminds me of when it was revealed that 400 people were working on Fuschia — a hobby OS that only shipped on a single smart home device.

show 6 replies