Calling C++ Functions from Carbon Using Bidirectional Interoperability
Learn how to call a C++ function from Carbon by creating an extern "C" wrapper, compiling it to an object file, and linking with carbonc --link-with.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to call a C++ function from Carbon by creating an extern "C" wrapper, compiling it to an object file, and linking with carbonc --link-with.
Learn how to add Carbon Design System Skeleton components to your React app, set up loading states, customize appearance with CSS variables, validate rendering, and handle common pitfalls.
Carbon's checked generics are validated against declared interfaces at definition time, not at instantiation like C++ templates. Here's what that changes, with a worked comparison and honest trade-offs.
A guide to deciding between Automatic Reference Counting (ARC) and manual memory management in Carbon to balance safety and performance in critical paths.
Interoperability Strategy for C++ Integration Carbon aims for bidirectional interoperability with C++, allowing existing C++ code to be utilized within Carbon projects. A primary design challenge involves determining the mechanism for importing C++ types and functions while maintaining language integrity. One approach relies on header-based imports, utilizin
Goal We need to replace the traditional offset‑based paging that uses setFirstResult and setMaxResults in Hibernate 6.x with a cursor‑based approach that references a monotonic primary key. The target is a table that contains millions of rows where large offsets cause full table scans and inconsistent results if rows are inserted or deleted between requests.
Carbon aims to provide a bidirectional bridge with C++ while maintaining a memory safety model through its default 'safe' dialect. This model restricts pointer arithmetic and unchecked memory access to prevent common vulnerabilities found in manual memory management. When integrating Carbon with legacy C++ code, the language must reconcile its strict type sy
Uncertainty in Carbon Retry Handling When a client retries a metric write to carbon-cache over TCP after a transport-level failure, it is unclear whether the point has already been durably stored in the Whisper file or merely queued pending acknowledgment. Whisper's design stores a single value per (metric, timestamp) pair and overwrites on replay, which nat
Context I am evaluating Carbon (the experimental C++ successor language) for a gradual migration of an existing C++ codebase. The design goal under review is how Carbon's memory-safety model interacts with its bidirectional C++ interoperability, specifically when ownership of an object crosses the language boundary. Uncertainty Carbon aims to reduce classic