rust-delegate
if-then-else
rust-delegate | if-then-else | |
---|---|---|
8 | 8 | |
422 | 344 | |
- | - | |
6.7 | 0.0 | |
5 months ago | over 3 years ago | |
Rust | ||
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rust-delegate
-
On inheritance and why it's good Rust doesn't have it
Ah, that answers the first question, as to how inheritance is superior to manual delegation. By the way, this crate seems to do a good job of supporting delegation: https://crates.io/crates/delegate. I have nothing against this in principle.
-
Fellow Rust enthusiasts: What "sucks" about Rust?
This is certainly one that's bugged me too. There's the delegate crate which helps, but is still a decent amount of boilerplate due to macro limitations
- Enum variants share Trait while Parent does not - A Better solution?
-
Hey Rustaceans! Got a question? Ask here! (44/2022)!
As u/onomatopeiaddx said, it isn't possible since macros only have access to the token tree it is given. I don't see why a newtype wouldn't work tho. and to help with newtypes you may want to have a look at the delegate crate
-
The Rust RFC process does not seem as amazing as I initially thought
Macros, probably. For example this one, that was already made by someone else, published on crates.io and is actively maintained. If the feature is already possible in rust, but requires a lot of boilerplate, then macros are the answer 99% of the time.
-
Inheritance to composition
delegate crate would reduce some boilerplate.
- Is there a way to append to struct in Rust?
if-then-else
-
Telefunken Datenspeicher
I agree that English as lingua franca of computing makes sense, especially when communicating with non-(German)-native speakers. But one important reason why German is no longer viable for this is the terrible state of translation from English to German. Instead of using the "established" German terms, English terms are usually translated 1:1 to German, usually by machine translation, or bad human translators who don't have a technological background.
And instead of this butchering of the fine German language, just switching to English is indeed the better alternative.
My favourite trivia is that the 'else' in 'if-else' is a bad translation from German into English btw ;) (https://github.com/e-n-f/if-then-else/blob/master/if-then-el...)
-
“A damn stupid thing to do”–the origins of C
There is a neat history of the early syntax of conditional expressions here https://github.com/e-n-f/if-then-else/blob/master/if-then-el... titled “if-then-else had to be invented”. It seems “else” originated in Algol 60 as a hasty translation from German. The CPL project started in the early 1960s when it was not yet certain that Algol-style block structure and keywords would become the common basis of most programming languages.
-
Hey Rustaceans! Got a question? Ask here! (44/2022)!
If..then..else had to be invented
-
The Surreal Horror of Pam
Not to mention that linux-pam's `[success=2 default=ignore]` isn't even standard, I think OpenPAM only has the five control flags required/requisite/sufficient/binding/optional. (One may reasonably despair as to the difference between "required" and "requisite".)
It's almost as if PAM were developed before the invention of the if-then-else construct in the 1950s.[0]
[0]: https://github.com/e-n-f/if-then-else/blob/master/if-then-el...
- If-then-else had to be invented
- If-Then-Else Had to Be Invented
- if-then-else had to be invented
What are some alternatives?
born - Remove code duplication from Struct and Enum with functional macros.
pam - An experimental, work-in-progress PAM module for Tailscale
dislike-in-rust - A list of the few things I don't like about rust
palette - A Rust library for linear color calculations and conversion
pollster - A minimal async executor that lets you block on a future
rust - Empowering everyone to build reliable and efficient software.
getrandom - A small cross-platform library for retrieving random data from (operating) system source
CredUI
compiler-team - A home for compiler team planning documents, meeting minutes, and other such things.
CBofN - Source code from the book "The Computational Beauty of Nature"
SHLL - An experiment of high level code optimization
askama - Type-safe, compiled Jinja-like templates for Rust