ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<GitHub156>
zig/master 249cb2a Andrew Kelley: fix regressions from previous commit...
Tobba has quit [Ping timeout: 240 seconds]
Tobba has joined #zig
cenomla has joined #zig
skyfex has quit [Ping timeout: 260 seconds]
jjido has joined #zig
jjido has quit [Remote host closed the connection]
Guest45571 has joined #zig
cenomla has quit [Quit: cenomla]
arBmind has joined #zig
PV_ has joined #zig
<PV_>
I found that I can write template functions in Zig just like in C++. Here's code that works in 0.1.1: https://pastebin.com/5h4Ez5BX
<PV_>
It means that I can create libraries which do not import the whole world but will still work. Much less dependencies, removing dependencies like A <-> B in favour of A->B.
<PV_>
Like in C++, error messages will be probably non-intuitive when the library code gets complex enough. It would be useful to be able to specify requirements at the beginning of the template function. The error would then point to the most relevant place.
<PV_>
Just today I proposed builtin @doesThisCompile(any code) -> bool, this would be useful in this situation.