> how a container is searched should be abstracted away in the container's implementation lol, no, god no. I think you got the STL completely wrong.
Indeed. It should be: >TL;DR: concurrency is unspecified in _C99_. Since it is specified in C11's memory model.
Anyone knows why anyone would impose these limits to crowdfunding?
In a non-deterministic garbage collector memory _might not_ be released when the last reference goes out of scope (and this is often the case).
forcing strict evaluation feels like a mess, template haskell feels like a mess, debugging space leaks feels like a mess, not to mention that the haskell learning curve is very high Haskell is pretty good at a lot of…
Do that and tell us how many people use your language. We'll be waiting.
Why use new/delete when you have make_shared and make_unique? Like 99.99999999% of the time you can use those. Like the only situation where I think they might be not enough is for some weird uses of placement new.
> And reference counting also renders the point of determinism moot - now you never know if releasing a reference while trigger freeing a resource. You know that releasing the last reference will. That is why the…
>You asked for a situation where the lifetime of a resource can't be directly tied to the lifetime of a single storage location. I don't think I asked for that but correct me if I did (maybe I'm just not understanding…
The solution above works even if your graph has cycles. Of course if you know that it doesn't you can just build the graph with unique_ptrs.
It's simple. The key is that something has to have _ownership_ of the products. [1] User decides to view a couple of orders. Orders reference products. Those products are managed by something (e.g. an unordered_map of…
Could you elaborate?
I fail to see why you need cycles' support for that.
Have a vector of shared_ptr that own the objects in the graph and build a graph with weak_ptr ? Removing an object is just as easy as removing an element from the vector. (If you test the weak_ptrs on use, that's…
Then the lists should only have a weak_ptr to the object. Something is handling both list [1], that something could own the object, or maybe something external to that. Giving ownership of the object to both list is a…
Because it is deterministic? (i'm just guessing that what you call "proper" garbage collector is non-deterministic). Furthermore, the only "advantage" I see in garbage collectors is that they can deal with cycles. I say…
In Germany I get paid around 3.500 Euro brutto per Month for pursuing my PhD at my university. Same conditions as the parent post: expected duration 5 years, 20% work time dedicated to university,... That's around…
well there is clang-format and clang-tidy and they are really easy to set up in CMake (I use "make format").
This is no gotcha; he deliberately shoots himself in the foot by using a "weird" integer type. The right solution is to use value_type from container/iterator_traits (that is what it is there for): accumulate(begin(v),…
> but I don't think "Run your code through a formatter when you're done hacking it together" is a viable, maintainable, or scalable policy. Just hook clang-format or clang-tidy with your build system. A lot of projects…
Yes, it does. Drepper's two points on the mails are the same points I made above: - your code is not valid C code, fix that. - these changes are pointless, since _unused0 could create problems in another system using…
In ISO C (7.1.3): All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces. In ISO C++ (17.4.3.2.1): Each name that begins with an…
Well, I'm sorry to disagree with you but Drepper is right. In C and C++ identifiers starting with an underscore are reserved for the implementation. Standard library implementors deal with extremely ugly code full of…
Disclaimer: this is a rant, it is obvious that I don't like OpenCL and that I think that it was designed by monkeys so take it with a grain of salt. In short: don't learn OpenCL. Both CUDA and C++AMP are good languages…
> how a container is searched should be abstracted away in the container's implementation lol, no, god no. I think you got the STL completely wrong.
Indeed. It should be: >TL;DR: concurrency is unspecified in _C99_. Since it is specified in C11's memory model.
Anyone knows why anyone would impose these limits to crowdfunding?
In a non-deterministic garbage collector memory _might not_ be released when the last reference goes out of scope (and this is often the case).
forcing strict evaluation feels like a mess, template haskell feels like a mess, debugging space leaks feels like a mess, not to mention that the haskell learning curve is very high Haskell is pretty good at a lot of…
Do that and tell us how many people use your language. We'll be waiting.
Why use new/delete when you have make_shared and make_unique? Like 99.99999999% of the time you can use those. Like the only situation where I think they might be not enough is for some weird uses of placement new.
> And reference counting also renders the point of determinism moot - now you never know if releasing a reference while trigger freeing a resource. You know that releasing the last reference will. That is why the…
>You asked for a situation where the lifetime of a resource can't be directly tied to the lifetime of a single storage location. I don't think I asked for that but correct me if I did (maybe I'm just not understanding…
The solution above works even if your graph has cycles. Of course if you know that it doesn't you can just build the graph with unique_ptrs.
It's simple. The key is that something has to have _ownership_ of the products. [1] User decides to view a couple of orders. Orders reference products. Those products are managed by something (e.g. an unordered_map of…
Could you elaborate?
I fail to see why you need cycles' support for that.
Have a vector of shared_ptr that own the objects in the graph and build a graph with weak_ptr ? Removing an object is just as easy as removing an element from the vector. (If you test the weak_ptrs on use, that's…
Then the lists should only have a weak_ptr to the object. Something is handling both list [1], that something could own the object, or maybe something external to that. Giving ownership of the object to both list is a…
Because it is deterministic? (i'm just guessing that what you call "proper" garbage collector is non-deterministic). Furthermore, the only "advantage" I see in garbage collectors is that they can deal with cycles. I say…
In Germany I get paid around 3.500 Euro brutto per Month for pursuing my PhD at my university. Same conditions as the parent post: expected duration 5 years, 20% work time dedicated to university,... That's around…
well there is clang-format and clang-tidy and they are really easy to set up in CMake (I use "make format").
This is no gotcha; he deliberately shoots himself in the foot by using a "weird" integer type. The right solution is to use value_type from container/iterator_traits (that is what it is there for): accumulate(begin(v),…
> but I don't think "Run your code through a formatter when you're done hacking it together" is a viable, maintainable, or scalable policy. Just hook clang-format or clang-tidy with your build system. A lot of projects…
Yes, it does. Drepper's two points on the mails are the same points I made above: - your code is not valid C code, fix that. - these changes are pointless, since _unused0 could create problems in another system using…
In ISO C (7.1.3): All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces. In ISO C++ (17.4.3.2.1): Each name that begins with an…
Well, I'm sorry to disagree with you but Drepper is right. In C and C++ identifiers starting with an underscore are reserved for the implementation. Standard library implementors deal with extremely ugly code full of…
Disclaimer: this is a rant, it is obvious that I don't like OpenCL and that I think that it was designed by monkeys so take it with a grain of salt. In short: don't learn OpenCL. Both CUDA and C++AMP are good languages…