-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's the problem with uutils? #62
Comments
For me, and that's my take on this matter, there are 4 things
The last one, I see several people doing this, but I consider a anti-patterns that I would like to avoid. I'll try to put in better words on the README as goals |
Hey, so I just stumbled upon this project and felt like I might as well answer some of these.
|
I see, like busybox, right?
Yeah, I agree, I mostly use Linux, FreeBSD and also NetBSD in some degree, so I decided to focus mostly on UNIX, but I don't have problems supporting Windows as well, I just don't use it and have no knowledge about the Windows API to do the same for every utility. Haiku is there because I do have a crazy friend that loves haiku and was interest in trying the project in that OS. Fuchsia was just a test since it's a tier2 target and I could easily check the code if it compiles or not.
Now that's a interesting subject cause I have a different opinion compared to Sep 2019. I do not consider that a anti-pattern anymore. What I was talking about is creating a new high level struct with all new fields using a more rusty types, but with a condition, it cannot be used as is in C call that would require the C version of the struct, till now I just got utilities that don't write into those structures, so the idea was just have new struct holding the data in a easier to use rust types just to look at the data and print it in a way. I still think that this is a better approach for the sole purpose is to read data in a easy way, but now I don't consider the raw pointer in the inner of the struct a bad idea. Even before I thought that if you mainly need to either to change data inside and/or keep passing the C struct back and forth to C calls and/or depend of the size of the struct, inner field with the C struct is the way to go, for the same reasons you mentioned, and now I do think recreating the struct in rust a anti-pattern, always. |
This is not a complain, I just want to understand the reason behind this project, since another trying to do the something similar exists, I understand the part that this don't try to be 100% compatible with coreutils (maybe making this easier to implement?), so would be cool to have the goals a bit more explained in the README
The text was updated successfully, but these errors were encountered: