Why Nostr? What is Njump?
2024-10-18 09:14:50
in reply to

Arwalk on Nostr: > You can't have a generic vector or map, and just destroy it. But you can? This test ...

> You can't have a generic vector or map, and just destroy it.

But you can?

https://gist.github.com/Arwalk/69f58af46563dd56e80e4485963a1b56

This test would fail to run if there were any leak, that's what the testing allocator is for.
hasFn is also completely solved at compile time so there is no extra overhead for the list if it has no need to be deinit.

You've been talking about about zig recently, and i'm sorry to be blunt but you've been wrong on a lot of things.

First, zig is to C what rust is to C++. Trying to compare both language when they do not live in the same paradigm (one being imperative, the other object oriented) is simply a bad idea.

You should probably stop fueling the fire and showing that you haven't taken the proper time to explore zig.

I'm not telling you to use zig if you don't want to or that zig is better than rust. Programming languages are tool that fit many uses, and different approaches. If you were more confident in the results of your code using Rust, it's perfectly fine. Just like if someone else could have made it in zig.

But just like i avoid making bold assumptions about rust considering my lack of deep knowledge and experience on it, maybe you should also abstain from doing the same?

Don't feed the trolls, the only answer for the question "why not zig" should have been "because rust fits the needs i have as a developper, and the use case as a tool for what i'm doing".
Author Public Key
npub1utmsl2sws63r744wcnc7pwtceqa6qf9j2vh7dwahwr5ut676p9ys8h2gq4