4 ms·
hello
by AndyKelley 4y ago
hello
- andrewmcwatters 4y agoI guess you're the guy! I'm learning now. :) But you're not the "nobody on GitHub" person I'm describing so I guess we need more people talking about and promoting Zig. I suppose these things just take time.
- AndyKelley 4y agoI am actually. Check out this 8 years old blog post (a couple months before I started zig): http://genesisdaw.org/post/progress-so-far.html http://genesisdaw.org/post/progress-so-far.html In particular: > So I wanted templates from C++. And atomics from C++11. But that's about it. Other than that, I want to code like I'm in C. The beauty of C-style coding is that the control flow is so simple, it's impossible to not know what code is doing. Contrast that with fancy C++ stuff and you never know what's going to happen or what each line of code is going to do. > I figured out how to have my cake and eat it too. I discovered that you can compile with g++ and link with gcc, like so: g++ -nodefaultlibs -fno-exceptions -fno-rtti -std=c++11 -c main.cpp -o main.o gcc -o main main.o > As long as you don't use anything from the C++ standard library, you end up with working code that was compiled with the C++ compiler and does not depend on libstdc++. > With clang it's even easier, just don't put -lstdc++ on the linker line.
- andrewmcwatters 4y agoVery interesting! I meant though that you're not a "nobody." People know of Zig, but might be people like me who don't know a tremendous amount about Zig.
- AndyKelley 4y agoI'm being a little cheeky, but I'm pointing out that actually, in fact, I was exactly this nobody that you are talking about for a period of time, and I had a very similar inner thought process as you do in the parent comment :)