Pystd, similar-ish functionality with a fraction of the compile time

6 days ago (nibblestew.blogspot.com)

Wow, that might be the worst name for a project I’ve ever seen. I think every programmer who sees this is going to assume it’s a Python thing.

With regards the library itself —- I think it’s generally known the c++ standard library is a poorly designed mess in places but if you make an entirely new one you lose all the software already written, at which point why use C++ nowadays?

  • It is a Python thing, in the sense that it is Python-inspired:

    > design-wise copy the Python standard library's APIs whenever possible [1]

    [1] https://github.com/jpakkane/pystd

  • Agreed, I thought this is a wrapper for STL under Python, what does the py prefix stand for here actually?

    As for the why c++ at all, as long as one falls into the "don't care" category, it works fine.. lately I found myself I rather build my apps in C with NODEFAULTLIB (under Windows at least), and creating my own size-optimized standard library which on Windows wraps the Win32 API wherever possible. The size savings are incredible, my executable is in the ~500KB range, ultra small and ultra fast. This is unattainable with normal modern C++.

    • I instead, use VC++ latest with C++23 import std.

      As for the size requirements, and having Windows experience all the way back to Windows 3.0, you can do exactly the same tricks with C++.

      7 replies →

> C++ is actually very fast to compile, the slowdowns come mostly from the way the standard library is implemented.

Only if using classical headers, std as module is already a reality on VC++.

  • wasn't there a lot of talk that modules are still not really working, in practice I mean?

    • Depends on where you are.

      VC++ and clang latest with MSBuild or CMake/ninja are there, minus some bugs or code completion misbehaving (but bearable).

      GCC 16 is mostly ok now, also with CMake/ninja.

      All my hobby coding in C++ makes use of modules, at work it is a different matter, where libraries to be consumed by Java/.NET/nodejs, are still using C++17 as baseline.

      You can easily check, https://github.com/pjmlp/RaytracingWeekend-CPP

      Note the CMake version was tested initially with clang 17, and we're already on clang 22, so some of those comments are irrelevant nowadays, I haven't bothered to update the project.

      Naturally if you cannot be on latest compiler releases, or suffer from CMake phobia, the support isn't there.

      2 replies →

Given what is discussed in the commentary to the post, I wonder whether the author would be amenable to some Doxygen.

Would be helpful to show how this compares to other C++ std replacements, e.g. Abseil and Folly.

Dumb. This is what modules are for. Also, the stdlib is extremely well designed. It considers edge cases most people never think about. Source: I am a Boost Developer.