Goodbye C++, Hello C

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • score-simple-api-2

  • You can also write things in a way that the user only has to provide things in a declarative way.

    For instance I'm working on an API for defining dataflow nodes for multimedia applications which tries to leave zero margin for error : the user simply has to define the inputs and outputs like this, as types, which the C++ type machinery is able to digest :

    https://github.com/jcelerier/score-simple-api-2/blob/main/Si...

    In contrast, in C, one has to cast things left and right because the only tool you have is void* : see for instance

    https://cycling74.com/sdk/max-sdk-7.3.3/html/chapter_msgatta...

    or

    https://cycling74.com/sdk/max-sdk-7.3.3/html/chapter_msp_adv...

    in both cases we are defining a dynamic dataflow node with various inputs / outputs (for instance an audio input and output, plus a control), which is then displayed in an user interface (thus things have to be reflected in some way).

  • sentry-native

    Sentry SDK for C, C++ and native applications.

  • > Put another way, I'd rather fix relatively simple C (which also tends to be simpler code in general) than the monsters created by "modern C++" because they thought the "added safety" would mean they could go crazy with the complexity without adding bugs.

    It's completely possible to write C++ code without it being a mess of a template mostrosity and massively overloaded function names. People who write C++ like that would write C filled with macros, void pointers and all the other footguns that C encourages you to use instead.

    I've been working with the sentry-native SDK recently [0] which is a C api. It's full of macros, unclear ownership of pointers (in their callback, _you_ must manually free the random pointer, using the right free method for their type, which isn't type checked), custom functions for working with their types (sentry_free, sentry_free_envelope), opaque data types (everythign is a sentry_value_t created by a custom function - to access the data you have to call the right function not just access the member, and this is a runtime check).

    Compare [1] (their C api example)

    [0] https://github.com/getsentry/sentry-native

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • CppCoreGuidelines

    The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++

  • GSL

    Guidelines Support Library

  • That's correct. Also see https://github.com/microsoft/GSL, which is a header-only C++ library that implements the Guidelines Support Library as specified by ISO C++. It's extremely useful (especially to get std::span if you don't have C++20 support) because it provides several constructs to explicitly clarify the _intent_of your code, like `gsl::not_null>`, `gsl::narrow_cast()` or `gsl::owner>`. `gsl::finally()` is also pretty useful.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Luau Goes Open-Source

    3 projects | /r/programming | 3 Nov 2021
  • Building a Production-Ready Web App with T3 Stack

    3 projects | dev.to | 19 Apr 2024
  • How to Handle N+1 Queries for Optimal Database Performance in Django?

    1 project | dev.to | 1 Apr 2024
  • Next.js Error Monitoring with Sentry: Enhancing Your Application’s Reliability

    1 project | dev.to | 15 Mar 2024
  • Marginalia: 3 Years

    3 projects | news.ycombinator.com | 25 Feb 2024