Hacker News new | past | comments | ask | show | jobs | submit | pagghiu's comments login

That's actually an excellent advice! :D

I love well written C libraries, like the sokol or stb libraries.


Well that would be slightly increasing the project scope


I could bring multiple examples, but just to make one CMake, what I think today is the most popular way of describing builds in c++, describes builds in an imperative language.

https://en.wikipedia.org/wiki/CMake#CMakeLists.txt

Most "declarative" build systems are not actually what they "declare" to be. I've seen too many DSLs introducing half backed imperative concepts here and there to do _if_ and _for_ constructs or function calls, redoing the same as imperative languages but poorly.


Of course Sane C++ Libraries targets a much much smaller functionality subset than Qt (that is a good library in many ways) and of course it has orders of magnitude less complexity. You can use Sane C++ Libraries adding a single file to your project for example. Also, Qt used to have an LGPL + Commercial licensing scheme (not sure how this has recently evolved), while this project just MIT.


There probably isn't a compelling use case for Qt-philes like me. But I wish your project the best of luck!

(the community version of Qt is LGPL, I have a small business licence)


I don't like to market it as an alternative to C++ stdlib, also because it doesn't cover all the things done by the C++ stdlib (in particular regarding Containers and Algorithms, as noted in other threads on this discussion).

I like to market it as an "alternative world" where the C++ stdlib is more a platform abstraction library focused on carrying practical tasks like networking, Async I/O, HTTP etc.

It's also definitively placing itself in the middle between unsafe C and bloated C++.


Yes the library is trying to model an alternative C++ world where the standard library tries to be more like the standard libraries of other languages (Python, nodeJS for example) providing actual functionality out of the box rather than just "containers and algorithms".


Huh right I see, I do like the idea of that and I wish that is what the actual C++ stdlib was more like, it would make my life of using C++ a lot more pleasant than it currently is :)

(also sorry my initial comment came off like ragging on your library, it wasn't meant that way, it was more of a commentary on the overall state of the C++ ecosystem, so I appreciate people with a slightly broader view like yours!)


Yes, I am trying to make C++ more pleasant than t currently is :) I like Python and JS ecosystems a lot (but also Zig and well done C libraries) and I'm trying to learn a tiny bit by their success and bring it to C++, that is my favorite language)

No problem at all for your initial comment! I share similar sentiment, I've found a lot easier in the past glueing C libraries to do something more than trying to integrate a C++ library for the exact reasons you're describing...


The bloat free is more referring to executable size, build complexity, compile time and in general to hidden complexity.

Every library having its own version of common data structure is unfortunately something that C++ programmers can't really seem to agree on :)


That's a fair observation.

What containers, beside Vector<T> (and Map<K,V> made with Vector) + variants would you like to see the most?


Set, Stack, Queue, and their various implementations (HashSet, PriorityQueue, etc)


There is a VectorSet that creates Set with an unsorted vector. I think it would be good (and easy) creating a SortedVectorSet for better performance.

HashMap and proper Map<K,V> are already on the roadmap https://pagghiu.github.io/SaneCppLibraries/library_container...

Stack can be easily created with Vector.

I think Queue is pretty specialized, but I will think about it.


My projects use stack and deque often.


Stack can be easily created with Vector (I can add it, thanks for the hint). I am conceptually against using Deque. If you need to keep stable addresses for objects you can use ArenaMap https://pagghiu.github.io/SaneCppLibraries/library_container...


Of course I would have been doing the same :)

The documentation here states:

https://pagghiu.github.io/SaneCppLibraries/library_reflectio...

Note Reflection uses more complex C++ constructs compared to other libraries in this repository. To limit the issue, effort has been spent trying not to use obscure C++ meta-programming techniques. The library uses only template partial specialization and constexpr.


Yes, the Algorithms library is just a placeholder, as specified in the docs.

https://pagghiu.github.io/SaneCppLibraries/library_algorithm...

Hopefully it will get expanded with more useful algorithms, it has not been a priority in the first releases cycle.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: