This is why I've started moving towards embedded. There is something really nice about being back on a chip with <1MB ram and a handful of Mhz. I know it's really just a leftward shift of a curve though. By the time I am getting ready to retire in 20 years these little 40mm devices will probably be running 500B parameter models.
Modules my guy. The words “modern” and “C++” don’t go together while using headers. Also your most basic implementation requires me to write 200+ LOC and add a dozen headers. Then it’s a ton of boiler plate code duplication for every function registered.
Basically what I am saying is - you need to place more abstraction between your code and the end-user API.
Why not make a templated getString<“message”> that pulls from payload? So that would instead just be:
auto sayMessage = payload[“message”].as_string() or
auto sayMessage = payload.getString<“message”>() or
std::string sayMessage = payload[“message”] //We infer type from the assignment!!
It’s way cleaner. Way more effective. Way more intuitive.
When working on this kind of stuff end-developer experience should always drive the process. Look at your JSON library. Well known and loved. Imagine if instead of:
message[“code”] = “JOIN”; it was instead something like:
Thank you for the detailed feedback—this is exactly the kind of input that helps the project grow.
You’re right: developer experience needs to be better. Right now there is too much boiler-plate and not enough abstraction. Your example
std::string msg = payload["message"]; // type inferred
is the direction I want to take. I’ll add a thin wrapper so users can write
`payload["key"].as_string()` or even rely on assignment type-inference. Refactoring the basic chat demo to be much shorter is now my next task.
About C++20 modules: I agree they are the future. The single-header client was a quick MVP, but module support is on the roadmap as compiler tooling matures.
If you have more DX ideas or want to discuss API design, please open an issue on GitHub I’d be happy to collaborate.
On the topic of modules: a single-header template implementation is still the most practical and quick way to distribute a library. Module support is currently iffy - I wouldn't use them.
I love modules. Honestly. I advocate usage simply as a forcing function for upstream. Tooling support is iffy because usage is low. Usage is low because tooling is iffy. All of the major players in the build space have reasonably mature levels of support though. So it's one of those things were compilers have outpaced IDE.
Thanks for the great follow-up discussion, everyone. This really highlights the classic "pragmatism vs. vision" debate in the C++ ecosystem.
You've all made it very clear that from a user's perspective, a single-header library is still the gold standard for ease of use and integration. The ideal scenario is for a developer to just #include "binaryrpc.hpp" and have everything work without touching their build system, and I now see that as a crucial goal for the project.
My framework isn't there yet, and the feedback has been a wake-up call that the current multi-header approach creates too much friction for new users.
So, my path forward is clear:
1. First, focus on simplifying the core API based on the initial feedback (e.g., creating wrapper objects for payloads).
2. Then, work towards providing a single-header distribution for maximum compatibility and ease of use.
I agree that modules are the future. But for now, delivering the most practical and frictionless developer experience seems to be the most important priority.
> Tooling support is iffy because usage is low. Usage is low because tooling is iffy.
There’s effectively one developer working on module support in clangd. I have submitted more than one issue with minimal reproducible examples of hard clangd crashes and every one is still open or Ive given up on following them.
I’m all for modules myself and when you aren’t hitting the edge cases hey are absolutely amazing.
Where I have found Claude most helpful is on problems with very specific knowledge requirements.
Like: Why isn’t this working? Here Claude read this like 90 page PDF and tell me where I went wrong interfacing with this SDK.
Ohh I accidentally passed async_context_background_threading_safe instead of async_context_thread_safe_poll and it’s so now it’s panicking. Wow that would have taken me forever.
Correct. No one is denying that Elon loves attention. Everyone knows Elon is really an acronym for 'Elon Loves Ostentatious Notice'. Its GNU'd and everything.
It was a very narrow ruling regarding civil liability for wrongful death as it applies to the word “children”.
Some insurance companies tried to say that these families had no financial recourse from embryos being destroyed because a certain law did not apply since they were not children.
They explicitly state that this does not confer criminal liability due to different wording in the law. It also states that this does not negate waiver, estoppel or affirmative defenses. It also upholds the dismissal of the case due to lack of wantonness or negligence on the part of the defendants.
This is the media blowing something up for click bait. To answer your questions in order: None. No. No.
It seems like the specific case here is narrow, but the implications are quite broad. The case applies a broad 2018 "sanctity of life" Constitutional amendment to a specific question around IVF clinic liability, and finds that this amendment makes the clinics liable. It's very hard to believe this ruling won't have very serious implications for the IVF industry in Alabama, at a minimum.
And when you've got State Supreme Court judges writing things like "It is as if the People of Alabama took what was spoken of the prophet Jeremiah and applied it to every unborn person in this state: ‘Before I formed you in the womb I knew you, Before you were born I sanctified you.’ Jeremiah 1:5,” there's every reason to believe that further exciting rulings could be expected from that court.
Negative. The court actually upholds the lower courts dismissal of the case.
It simply holds that the word “children” in a law written in the 1800s includes the unborn. That is that an insurance company can’t argue that because this thing wasn’t born, it’s not a child, and they are immune from liability.
They cite partial birth mishap as one reason for that. Like if a doctor accidentally decapites a child during delivery, their insurance would still be liable. Or if a pregnant woman is murdered, the killer could be held financially liable for both. Had they ruled the other way, that would not be the case.
The criminal statute had been updated in 2008 with different wording to clarify this matter.
Again, very very narrow ruling. Experts in a field made a nuanced decision that the media is hyping for views.
Considering an assembly of ~10 cells an "unborn child," to the point of allowing wrongful death suits, seems quite extreme to me. That's a far cry from accidentally decapitating a baby during delivery.
Also, embryos are so early that the very mechanics of life are different. Embryos last decades in cold storage, good luck trying that with a fetus. They're not in a womb. They're not on a path to becoming babies until they're successfully implanted. These "experts" are straining the law far beyond any possible plain meaning or original intent.
Yeah man, I don’t disagree with any of that. But that is not what the ruling is about. The law, as it is written, only says “children”. This was a law written in the 1800s. It does not consider any of that.
The defense said, “hey you should throw this out because that thing isn’t a child, it hasn’t been born yet. Also, even if it was a child, they signed waivers and accidents happen.” The court said, “you can’t just say this doesn’t count because it hasn’t been born yet, but your right about the other stuff. Case dismissed.”
They did not rule on the number of cells that constitutes a child because that was not the argument. Here is the pseudocode:
Defense: If(!born) then child = false
Judge: Error
Media: mind blown
You: ‘If(cells <= 10) then child = false’ works on my machine
> Yeah man, I don’t disagree with any of that. But that is not what the ruling is about. The law, as it is written, only says “children”. This was a law written in the 1800s. It does not consider any of that.
A law in the 1800s did not consider embryos children. They did not have funerals for every miscarriage, most people didn’t name children until after birth, and in the early 1800s abortion was a not uncommon practice and even advertised.
I think it’s also worth noting that when that started to change it was racist and focused on babies, still having no concept of an embryo as a human, as white people got concerned that immigrants and former slaves would outbreed them:
Alabama was early to criminalize but the laws reflected the understanding of the time–functional but not scientific–and banned inducing a miscarriage because they understood how pregnancy worked but didn’t treat it as murder, following biblical precedent. The total ban is a historical precedent going all the way back to 2019: https://www.montgomeryadvertiser.com/story/news/2022/06/24/a...
The parties to these cases have raised many difficult questions, including ones about the ethical status of extrauterine children, the application of the 14th Amendment to the United States Constitution to such children, and the public-policy implications of treating extrauterine children as human beings. But the Court today need not address these questions because, as explained below, the relevant statutory text is clear: the Wrongful Death of a Minor Act applies on its face to all unborn children, without limitation.
Under the defendants' test, even a full-term infant conceived through IVF and gestated to term would not qualify as a "child" or "person," because such a child would be "unborn" (having never been delivered from a biological womb).
Unborn children are "children" under the Act, without exception based on developmental stage, physical location, or any other ancillary characteristics. It is not the role of this Court to craft a new limitation based on our own view of what is or is not wise public policy.
As I have stated above this is a very narrow ruling. About born or unborn. And what’s more it doesn’t even rule in favor of the families. It upholds the dismissal of the case on other grounds.
You are all trying to apply this to cases that they explicitly side stepped! The ONLY questioned answered by the court is: Does this law apply to unborn children? Nothing more.
It's very strange because I read the "Wrongful Death of a Minor" statute and it says nothing about born vs. unborn children, unless it was recently amended. If I'm reading you correctly, you're saying that the Court previously interpreted that "black letter statute" wording to include unborn children (even if the actual wording of the statute does not) and in this case they're merely taking the "relatively uncontroversial" step of expanding their novel interpretation of the statute so that it also includes IVF embryos. Even though the statute discusses neither.
The dissenting justice seems to confirm my impression: "Justice Greg Cook, who filed the only full dissent to the majority opinion, said the 1872 law did not define "minor child" and was being stretched from the original intent to cover frozen embryos."
So the court has now made two rulings that vastly expand the scope of the "minor child" that is mentioned in the "black letter statute". This is obviously fraught with ethical implications and implications for future cases. But since the court asserted that this is simply applying "statute" and there are "no major ethical implications", I guess we just have to accept their assertion? That seems foolish.
> The ONLY questioned answered by the court is: Does this law apply to unborn children?
No.
The very beginning of the opinion:
> This Court has long held that unborn children are "children" for purposes of Alabama's Wrongful Death of a Minor Act, § 6-5-391, Ala. Code 1975, a statute that allows parents of a deceased child to recover punitive damages for their child's death. The central question presented in these consolidated appeals, which involve the death of embryos kept in a cryogenic nursery, is whether the Act contains an unwritten exception to that rule for extrauterine children -- that is, unborn children who are located outside of a biological uterus at the time they are killed. Under existing black-letter law, the answer to that question is no: the Wrongful Death of a Minor Act applies to all unborn children, regardless of their location.
Yes. It applies to all unborn children. The central question presented in these consolidated appeals is whether the Act contains an unwritten exception to that rule for extrauterine children -- that is, unborn children who are located outside of a biological uterus at the time they are killed.
The circumstances of the case, that is that it involves death of embryos kept in a cryogenic nursery, is not material to the validity of the argument.
They did not say: even if they are embryos. They said all unborn children.
This does not mean embryos ARE children. That was not what was argued nor what the court decided upon. You are inferring meaning outside the scope of the ruling. They side stepped the part you are upset about. They are very, very clear that this is about unborn children. The word embryos only appear once - while discussing the surround context, not the finding of the court or the question they were answering.
I am not inferring or making any claims. I am merely correcting your incorrect claims.
I believe that you are not arguing in good faith. The opinion is very clear on the matter. It is also extremely clear on what they are clarifying. You are making claims that make it clear you have either not read the opinion or are intentionally misconstruing it's language.
Yes, but the number of cells is somewhat relevant. Any unfertilized egg or misplaced sperm is an important fraction of a child. A single fertilized egg could be viewed as a child.
The court did not rule on that. This specific law only says children. The defense said this case did not apply because these are embryos that had not been born. The court said that’s not a valid argument because the word children includes unborn children.
For you to then say, ohh well these don’t meet the development criteria is a different argument entirely. That was not the test proposed by the defense. Had they said, this does not count because it doesn’t meet a cell count threshold, then that would be something the court did not rule on.
We reverse the trial court's dismissal of the plaintiffs' wrongful death claims in both appeals (regarding the born/unborn). Because the plaintiffs' alternative negligence and wantonness claims are now moot (open for discussion), we affirm the trial court's dismissal of those claims on that basis.
It means that those claims don’t matter anymore because of the decision on another. Because of Decision A, Claim 2 doesn’t apply anymore. The negligence claim was a back up in case the court found that the embryos were not children. Because they were found to be children, the negligence claim was no longer relevant and therefore dismissed.
Here is the text of the law:
(I paraphrased the recourse portion)
If the death of a minor child is caused by the wrongful act, omission, or negligence of any person, persons, or corporation, or the servants or agents of either then (people can sue)
You need all three elements:
1) Death
2) Child
3) Wrongful Act/Neglience
If 1 AND 2 AND 3 then ACTION
Trial found 1 true, 2 and 3 false.
Ala SC said actually 2 is true, but 3 is still false.
Your reading makes no sense. “Yea its a child, so it doesn’t matter if there was negligence”. No. You need all 3.
They said: “We find lower court was wrong, 2 is reversed and now true. Since this now makes clause 3 open to discussion, we affirm that they were right in saying 3 was false. As a result the case is dismissed.”
I'm honestly not sure if you are being intentionally obtuse or you just haven't read the opinion.
> Each set of plaintiffs asserted claims under Alabama's Wrongful Death of a Minor Act, § 6-5- 391. In the alternative, each set of plaintiffs asserted common-law claims of negligence (in the LePages and Fondes' case) or negligence and wantonness (in the Aysennes' case), for which they sought compensatory damages, including damages for mental anguish and emotional distress.
(page 5)
Note: "In the alternative"
There were two claims:
1. They claim coverage by the Wrongful Death of a Minor Act.
2. They provide an alternative, so that if the Wrongful Death of a Minor Act does _not_ apply, they claim negligence.
These are two separate claims.
The ruling states that since Claim 1 does apply (frozen embryos do fall under the Wrongful Death of a Minor Act), then Claim 2 is no longer relevant, because it was only relevant if Claim 1 did not apply. Therefore Claim 2, is dismissed, upholding the lower court's decision _on that claim_ (but not the full case).
Right, but by upholding that there was no negligence in the alternative case they prevent the conditions in Wrongful Death of a Minor from being met. There is nothing left to argue.
Are you suggesting the lower court now over rules the upper court and say there was negligence? The upper court has already said there wasn’t. Just because it was settled in a side branch doesn’t reverse the decision or leave it up for discussion.