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

>Does it take ownership of options, a struct with a single size_t.

This is a bit extreme. My first thoughts (honestly) is yes, what is the size of. Following their advice to follow their examples, I looked at examples and it literally just zeros a uiInitOptions on the stack and sends it in. Thus I think it's something I wouldn't really need to care about usually.

As for whether I need to worry about saving 8 bytes on the stack or elsewhere, that seems like such a rare question (amongst the questions people would have) that it would motivate digging a little bit. It took me probably 3 minutes to find the answer[0].

As someone said above, this is one cat's work in their free time. The gratuitous criticism is very unfair to them especially when you're worried about out circumstances most devs wouldn't have to deal with or care about.

[0] https://github.com/andlabs/libui/blob/master/unix/main.c#L11



"Usually?" What are the unusual circumstances? Will I need to care about it at an inconvenient time two years later?

I mean, yes, I can probably guess some things and end up with something that works with the current version of the library, but why would I choose this library to build on top of if I'm just guessing?

The code cannot possibly answer the question of what changes the developers may make to the project in releases they consider backwards-compatible. My question is entirely about the API, not about the code itself.


...not to mention that this is obviously a work in progress. We're looking at a project's github page, not a product release page. I would think that like with a lot of coding projects, you start with an initial idea and see where it takes you, rather than with a full specification that you then follow. Given the limited resources of a single programmer, writing an extended documentation early on and then keeping it maintained with every chance to the architecture would be a huge burden, time and effort-wise. That's not to say it cannot be done, but I understand if you want to spend your time on coding first, if it's a pet project. There's nothing that prevents documentation to be added in the future.


Yes, sorry—I should have been abundantly clear that I was responding only to the "You can figure it out yourself from the header file, you don't need docs" point. If it's an unfinished or hobby project, great! Those are cool, and I don't mean to discourage them / place high bars on them existing in public, and I am super sorry for not being clear about that.

Hobby or personal-interest projects with an expectation of no real use don't need externally-facing documentation because they have no externally-facing APIs at all, not because their APIs are obvious.




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

Search: