Freestanding C++ - Past, Present, and Future - Ben Saks - CppCon 2019

  Рет қаралды 4,242

CppCon

CppCon

Күн бұрын

Пікірлер: 4
@goswinvonbrederlow6602
@goswinvonbrederlow6602 2 жыл бұрын
One thing I would like for c++ and freestanding would maybe be levels of freestanding. In freestanding C you turn on your hardware, set the stack pointer, zero out .bss and you are ready for C main(). Freestanding c++ is a lot more involved with features most users of freestanding don't want (exceptions, rtti). So I would love to have maybe level0: no new/delete, just constructor calls, alloca, really just bare hardware. level1: memory management (new, delete, malloc, free, allocators). And then it gets kind of gooey: level2a: exceptions+rtti and level2b threads. It becomes more of a feature tree. Libraries and Users can then pick a Node in the tree and use everything below. I would also love some way for new/constructors to fail without exceptions.
@shawnshaw9859
@shawnshaw9859 2 жыл бұрын
or, just provide the rust-alike no-std option with a subset library called libcore, so I can use c++ for OS and firmware development.
@bigboysteen7638
@bigboysteen7638 3 жыл бұрын
99% of the c++ standard library is inline templated stuff, like std::move or std::array, yet free standing can't have those things why? they do not require an operating system, they do not require linking to a library, so why aren't they accessible to freestanding? this sounds extremely foolish to me and since new is actually required by the standard, we could even have most containers. so c++ requires freestanding to have exception handling and rtti, but it can't provide std::array, what a bad language
@goswinvonbrederlow6602
@goswinvonbrederlow6602 2 жыл бұрын
I'm doing embedded work with c++ and when you start with some hardware you don't have new, you turn of exceptions and rtti because you have no code to set that up and it is complicated to do. And then start programming. 99% of the c++ standard library are right out the window at that point. You eventually implement malloc/free/new/delete but quite often you never want exceptions and rtti. And that is kind of the target audience for freestanding I feel. If you want 99% of the standard library then just link against a standard library. Freestanding doesn't mean you can't have an STL. Freestanding is where you start from to implement an STL so I think it already has too much, or rather the wrong things.
Better Code with C++ Attributes - Ben Saks - CppCon 2019
1:00:48
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
CppCon 2019: Jason Turner “The Best Parts of C++"
58:36
CppCon
Рет қаралды 92 М.
Back to Basics: Const as a Promise -  Dan Saks - CppCon 2019
1:01:34
My Own HTTP Client Library in Pure C ­- Offline Stream #03
2:49:18
Tsoding Daily
Рет қаралды 39 М.
Great C++ is_trivial - Jason Turner - CppCon 2019
54:53
CppCon
Рет қаралды 26 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН