• 1 Post
  • 6 Comments
Joined 1Y ago
cake
Cake day: Sep 02, 2023

help-circle
rss

GPL libraries have an advantage in their legal power. MIT libraries have an advantage when users have to choose between 2 libraries.

All other things being equal, users will use more permissive libraries. So unless maintainers put more effort into the GPL, a MIT one will gather more users, which attracts more maintainers, which ends up in more MIT libraries than GPL ones existing.


Probably because rust links statically by default, so making a library gpl means users will be forced to make their project GPL too, so MIT libraries have an incredible advantage.

IANAL though, so idk.


Yeah, that seems like it would work! Unfortunately I can’t use unstable features. I’ll keep it in mind for other projects though.


I’m sorry, no wonder you are lost, so it made no sense when you wrote this comment, lemmy deleted everything between the “less than” character and “>”. I had to change them for “<” in order for them not to get deleted.


[help] impl block for generic type overriden by specific type
I want to do basically this: ```rust struct MyStruct < T> { data: T } impl < T> for MyStruct < T> { fn foo() { println!("Generic") } } impl for MyStruct < u32> { fn foo() { println!("u32") } } ``` I have tried doing ```rust impl < T: !u32> for MyStruct < T> { ... } ``` But it doesn't seem to work. I've also tried various things with traits but none of them seem to work. Is this even possible? EDIT: Fixed formatting
fedilink

In tip #3 I don’t see any benefit of doing impl AsRef<[T]> over &[T]