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

Definitely interesting and seems to be a nice improvement over Protobuf. Especially for Python, Protobuf bindings for Python were made probably after taking a lot of hallucinogenic drugs.

I like constants, great addition.

Things that I'll miss:

1. Oneof fields. There are enums, but it looks like it's not possible to have ad-hoc onefos?

2. Streaming requests/responses.

3. Introspection and annotations.

4. Go bindings.



Thanks for the comment! Agree with you about the horrible Protobuf-to-Python bidding, it was a big frustration and definitely contributed to me wanting to build Skir.

1. You can create an enum with just "wrapper" fields, that's exactly like a oneof

2. Totally fair, I'm planning to work on this later this year, probably Q3 (priority is adding support to 4 more languages, and then I'll get to it)

3. So there is introspection in the 6 targeted languages, and I think I did it a bit better than protobuf because it generally has better type safety. Example in C++: https://github.com/gepheum/skir-cc-example/blob/main/string_...;

Typescript: https://skir.build/docs/typescript#reflection

I realize I haven't documented it in Python (although it is available and generally the same API as Typescript), will fix that

However, you're right that there is no support yet for annotations. Still trying to gauge whether that's needed

4. Assuming you mean Go language: working on that now, hoping to have C#, Go, Rust and Swift in the next 2-3 months.


> So there is introspection in the 6 targeted languages, and I think I did it a bit better than protobuf because it generally has better type safety.

A bit different kind of introspection. In Protobuf I can write a code generator that loads the compiled PB descriptions and then generates whatever it needs.

For example, I'm using it to generate SQL-serializing wrappers for my Protobuf types for Go.

Oh yeah, also having a standardized pretty-printer would be great.




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

Search: