0 码力 |
112 页 |
5.17 MB
| 1 年前 3
2
cppfront: Recap
Safety for C++
50 esp. guaranteed program-meaningful initialization
Simplicity for C++
10 esp. for programmers
cppfront: What’s new
Types, reflection, metafunctions, …
Simplification for C++
Why • What kind • What plan
3
green-field language
invent new idioms/styles
new modules
new ecosystem/packagers
compatibility bridges
refresh C++ itself
make C++ guidance default
make C++ modules default
keep C++ ecosystem/packagers
keep C++ compatibility
this talk
4
What could we do if we
had a cleanly demarcated
“bubble of new code,”
via an alternate syntax for C++?
reduce complexity 0 码力 |
85 页 |
5.73 MB
| 1 年前 3 ## COMPOSABLE C++

## BEN DEANE / @ben_deane
CPPCON 2021
## I N THIS TALK
1. Composability defined
2. Composable types prioritization
request → A f → B f → C f → unhandled
t → t → t → t → handled
## CASE STUDY: LOGGING
## From "Easy to Use, Hard to Misuse: Declarative Style in C++" (CppCon 2018)
struct log_sink ments/c/3/3/1/c331a812ea25eaf59e92bd9bda4ff4dd/p42_1.jpg)
alignment
cohesion
## MORE BEHAVIOURS
We can arbitrarily layer more behaviours into the calculation.

Timur Doumler
CppCon
18 September 2024

The Swan, The Pike, and The Crab – Fable by Ivan Krylov, 1814
## Proposal: add contract assertions to C++
Widget getWidget (index i)
pre (i > 0) // precondition assertion
## Proposal: add contract assertions to C++
// precondition assertion
// postcondition assertion
## Proposal: add contract assertions to C++
Widget getWidget (index i)
pre (i > 0) // precondition 0 码力 |
181 页 |
4.44 MB
| 1 年前 3 6ac042f881af6d8a666/p1_2.jpg)
## Emeritus participant in C++ standardization
• Written ~175 papers for WG21, proposing such now-standard C++ library features as gcd/lcm, cbegin/cend, common_type, and Project Editor for the Int'l Standard on Mathematical Special Functions in C++ (ISO/IEC 29124), incorporated into ; M.S., Ph.D. (computer science).
• Professional programmer for over 60 years, programming in C++ since 1982.
Experienced in industry, academia, consulting, and research:

Functional Functions (NIFs)

Call C/C++ from Elixir

Compiles Write a NIF?
01
Erlang/Elixir $ \neq $ CPU-heavy tasks.
02
Direct
hardware
interaction.
03
Interop with
graphics
libraries.
04
Existing Native libraries too complex to rewrite.
mirror_mod.mirror_object 0 码力 |
14 页 |
609.86 KB
| 1 年前 3
|