

One utility function somewhere vs runtime polymorphism everywhere?
Yes.


One utility function somewhere vs runtime polymorphism everywhere?
Yes.


It was a simplified example.
B and C can’t share any other attributes without duplication of code
struct A {
[[nodiscard]] virtual std::uint32_t DoSomething() = 0;
};
struct B : A {
std::uint32_t DoSomething() override {
return 0;
}
};
int main() {
B b;
b.DoSomething(); //no warning
}
even if you use virtual attributes aren’t inherited.
If you ment members instead of attributes this is unrelated to virtual:
struct A {
std::uint32_t a;
};
struct B : A {
void DoSomething() {
std::println("B");
}
};
struct C : A {
void DoSomething() {
std::println("C");
}
};
Now the member is shared and it works fine and there is no virtual.
There’s also no strict enforcement of inheritance.
True, but neither is there when just using virtual:
struct A {
virtual void DoSomething() = 0;
};
struct B : A {
};
This compiles fine if final is not added.
Not that its an issue as reflection has solved this problem:
consteval std::string_view HasMethods(std::meta::info impl, std::meta::info iface) {
constexpr auto ctx = std::meta::access_context::unchecked();
for (auto fn : members_of(iface, ctx)) {
if (!is_function(fn) || is_special_member_function(fn)) continue;
bool found = false;
for (auto cand : members_of(impl, ctx))
if (is_function(cand) && has_identifier(cand) && identifier_of(cand) == identifier_of(fn) && type_of(cand) == type_of(fn))
found = true;
if (!found)
return std::define_static_string(std::string(identifier_of(impl)) + " is missing " + display_string_of(fn));
}
return {};
}
struct A {
void DoSomething();
};
struct B {
};
static_assert(HasMethods(^^B, ^^A).empty(), HasMethods(^^B, ^^A));
// g++ -std=c++26 -freflection main.cpp
// main.cpp:30:41: error: static assertion failed: B is missing void A::DoSomething()
// 30 | static_assert(HasMethods(^^B, ^^A).empty(), HasMethods(^^B, ^^A));
Now you get the strict enforcement of inheritance and no virtual.


Why does it make zero sense in C++?
edit: simplified example of what i mean
struct A {
virtual void DoSomething() = 0;
};
struct B : A {
void DoSomething() override {
std::println("B");
}
};
struct C : A {
void DoSomething() override {
std::println("C");
}
};
void InvokeDoSomething(A* a) {
a->DoSomething();
}
vs
struct B {
void DoSomething() {
std::println("B");
}
};
struct C {
void DoSomething() {
std::println("C");
}
};
template <typename T>
void InvokeDoSomething(T* t) {
t->DoSomething();
}


No idea how much of a hot take it is but i find virtual to be a plague upon a codebase.
There are a few very rare use cases for it, but imo most cases where developers use virtual they can use templates instead to achieve the same result.


Call it wistful thinking but I still believe donations are the way forward.
But it requires a bit of a shift in both willingness and ease.
Currently donations are also distributed pretty unfair, they go mostly to the user facing side, while crucial packages remain forgotten.
I would almost suggest some kind of system where you could set aside a certain amount of money, and it would donate automatically to all your installed packages, with some kind of weighting system I suppose.


Nobody is going to accept that.
If Putin doesn’t accept the proposal, the UK and France would send troops to Ukraine.
The UK and France especially aren’t going to accept that, there is nothing stopping them from sending troops now, but they don’t.


I would recommend using a classifier model instead of a text generation one.
As for the way to do it a simple program that connects to you mailbox via imap and calls the vllm or whatever api you are using and then moves it to spam could work?


They are scared of chinese open source AI


Company that is set to make a huge amount of money from hyping up its product hypes up its product, experts shocked.
I’m not sure what annoys me more, the AI companies making these grandiose claims or the media giving them the attention for it.


I hope more people take this chance to leave X for good.
This is what they sent me:
Waarom is mijn account gesloten?
Op basis van onze beoordeling hebben we vastgesteld dat je onderneming een risiconiveau heeft dat buiten onze acceptatiecriteria valt. Zoals beschreven in artikel 4.1 van onze Gebruikersovereenkomst kan Mollie haar diensten weigeren of beëindigen wanneer een onderneming niet voldoet aan onze risicovereisten.
Translation:
Why has my account been closed?
Based on our assessment, we have determined that your business presents a level of risk that falls outside our acceptance criteria. As set out in clause 4.1 of our User Agreement, Mollie may refuse or terminate its services if a business does not meet our risk requirements.
I guess they are referring to this paragraph in 4.1:
Mollie may also decide, at its own discretion, to decline products and services that are not explicitly mentioned on the list, but which pose an unacceptable risk to Mollie based on its internal policies.
But I have no idea why i am considered unacceptable risk?
Yeah, but it’s more of the same as far as I understand, a closed scheme that requires a payment processor to enter.
It’s also not available in the Netherlands yet.
I mean if it’s just a question of work i would do it, but it costs a ton of money as you said.
Netherlands, i can acsess my bank’s API no issue, that’s how i made my current bank transfer integration, but card payments are now impossible.
Supposedly i am violating this article:
SECTION 4: YOUR OBLIGATIONS
Article 4.1 Prohibited Activities
You must only accept payments and process them through Mollie’s Payment Module for the lawful sale and provision of legal products and services according to the Organisation’s country of establishment, the Customer’s country and the Netherlands. There are certain categories of Organisations and activities for which the Payment Services cannot be used. Most of these categories are imposed by the Financial Institutions and Intermediaries and applicable Scheme Rules used by Mollie to process Transactions. Mollie keeps a list of prohibited activities. Mollie has made the full list of prohibited activities, products and services available on its website. Mollie can, at any time and without prior notice, change this list, and remove or add activities or services. Mollie may also decide, at its own discretion, to decline products and services that are not explicitly mentioned on the list, but which pose an unacceptable risk to Mollie based on its internal policies.
By registering with Mollie, you confirm that you will not use our services for activities other than those approved during registration or explicitly approved by Mollie afterwards. If Mollie thinks or suspects that you are nevertheless accepting payments for prohibited activities as referred to in this Agreement, you must cease these prohibited activities immediately at Mollie’s request. If you do not cease the prohibited activities within the period set by Mollie, Mollie reserves the right to suspend your Account and/or terminate this Agreement with immediate effect. In case of doubt, you should contact Mollie Support for further information. If Mollie determines that your activities pose a risk to it that cannot be remedied, Mollie reserves the right to terminate this Agreement with immediate effect and without prior notice for such activities. Any Fines imposed by an Intermediary in relation to a breach of this section are payable by the Organisation.
This is my shop
Im not even selling anything at the moment, and even if i was linux phones aren’t illegal?
At first i tought donations were prohibited but they are allowed?
https://help.mollie.com/hc/nl/articles/115000632489-Kan-ik-Mollie-gebruiken-om-giften-te-ontvangen
This is the list of prohibited activities:
I can only think that they banned me under “Hacking or cracking tools” because they found the word “flashed” scary sounding.


Fair, but shouldn’t the Netherlands or EU decide that, not the United States?


It’s time for Europe to decide if we want to be a US puppet state or independent.
Ive looked into it and maybe i understand it wrong but isn’t this just crypto?
Isn’t this already what people do when they pay with EURC?
buy EURC at an exchange, get it into their wallet, send it to my wallet, i sell the EURC for EUR at an exchange?
I mean i don’t mind paying a bit, they also have costs they need to cover ofcourse.
What i do mind is all this legal stuff, and then i submit the legal stuff, and my account gets terminated for no reason.
How is it jank to put one utility function in a file somewhere you never need to look at again?
That is if you even want to do the assert since if the type doesn’t have the method it won’t compile in the calling function anyway but since you mentioned the strict check it’s fully possible.
And why isn’t it jank to write virtual, final, and override everywhere and have the entire codebase infested with vtables.