[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


zig vs. odin
does it just come down to explicit vs. implicit?
if you know enough about both, which do you prefer and why? any glaring issues with either?
>>
>>107095211
both of those die the moment jai releases
>>
>>107095211
:: and ^ shouldn't be used in language syntaxe, so fuck you Ginger Bill
>>
>>107095394
True
>>
>>107095394
why?
>>
odin is a pickme lang among "C alts"
and zig is a hobby project that andrew somehow made a career and living from.
>>
File: file.png (6 KB, 851x159)
6 KB
6 KB PNG
>>107095495
it looks fucking retarded, only the mental ill can look at ^os.File and don't see anything wrong with it
>>
>>107095520
are there any C alternatives you'd consider a serious contender?
>>107095394
i kinda like ^ lole
>>
File: sorting-by-stars-github.png (252 KB, 1250x1080)
252 KB
252 KB PNG
\thread
>>
>>107095577
who cares if you use ^ or * it makes zero difference
>>
>>107095211
zig if you want
> comp time
> methods
> don't mind moving target
odin if you want something stable with a very nice standard library.
>>
>>107095616
It makes a difference for europeans. ^ is a silent character, you have to type ^ and space, if you type ^ and then o in this case it becomes ô
>>
>>107095211
Thanks but I'm sticking with C++.
>>
>>107095715
>filters the third world
Looks like we have a winner.
>>
>>107095715
who the fuck cares about some special snowflake keyboard.
>>
>>107095726
ginger bill is from the third world too (UK)
>>
>>107095394
> ^ is pointy like "pointer"
> avoid the retarded overloaded semantics for * between pointer initialization and deferencing
Sounds pretty good to me

 proc :: func 
is arguably odd, but not something important to really care about.
If we want to find some positive aspect, it makes parsing slightly easier when looking for a function definition and resolves the ambiguity with its call, regardless of the number of whitespaces since you can just use grep with
 grep -P '::\s*function-name' file.odin  
>>
>>107095211
zig may not be my cup of tea, but it's a serious endeavour.
"game developer" meme languages like odin and jai are just unintentional dunning-kruger exposés made by megalomaniac retards with online "fanbases".
>omg guys did you know about this new thing called "data-oriented" programming, because objects are bad and not cache-friendly. it's totally revolutionary stuff.
this retardation does get a laugh out of me every time i see it though, especially when it's touted like it's really a new discovery, i will give them that at least.
>>
File: odin-gpl.png (92 KB, 639x429)
92 KB
92 KB PNG
>>107096007
>"game developer" meme languages like odin
I don't know about jai but odin is a GPL
>>
>>107096007
i got into this space through odin but some design is starting to irk me. reading into zig, i find it's a similar case, but maybe still a better path.
i just find it weird they ended up like:
odin: implicit syntax, but explicit/external meta/toolchain.
zig: explicit syntax, but implicit/internal meta/toolchain.
what i really want is explicit both. but i'm a noob so what do i know? i guess i can do it with zig and only use comptime when truly necessary, i guess that's the intention? i just can't help but find it more elegant to do meta by having external codegen so i can directly debug it and the result instead of relying on complex internal magic. is that just midwittery?
>>
>>107096132
>ctrl-f "general-purpose"
>look guys it's a general purpose language that's totally not designed by gamedevs for gamedevs to do gamedev!
fucking retard
>>
>>107095577
so there's no problem, you're just a whiny bitch? got it
>>
>>107095211
I looked into this a few months ago. The gist of it is that Odin is slower (like 1.5-2x slower than C), while Zig tries to match the speed of C exactly.

Also, Odin is more buggy. Zig is buggy too, but Odin more so.

Lastly, Zig is all about meta-programming via `comptime`. Odin is more C-like.

Overall, I decided not to use either of them. Reasons:

* Maturity. Bugs in the compiler or `std` are best avoided.
* No jobs now or in the foreseeable future. The time you spend learning these is a waste.
* LLMs prefer popular languages, and these days coding is all about getting help from LLMs in order to code 10x faster.
>>
>>107096517
learn c then rust if you haven't already. zig is not even v1 yet, and you can learn it in the future if the need arises.
>>
>>107096007
can you go into whats wrong with odin?
>>
>>107095394
>>107095495
the only reasonably valid argument against using ` or ^ or ~ is that they are dead keys on many non-English keyboard layouts and thus a bit awkward to type. however this is just cope and a skill issue, I've been typing and programming with these being dead keys for over 20 years without issue, it takes very little time to muscle-memorize how to wrangle them
>>
>>107096517
>zig: explicit syntax, but implicit/internal meta/toolchain
I'm curious, could you explain why you mean by "implicit" meta/toolchain?
>>
>>107100858
they'll never do that. best you'll get is crying about surface level syntax that literally does not matter like keyword choice
>>
>>107100858
if it's good, why isn't it self-hosted?
>>
>>107101353
why would someone make a compiler self hosting other than autism? it's just a bunch of extra pointless work. odin has already proven its worth by running production code of something nontrivial
>>
>>107101462
>running production code of something nontrivial
why can't that something be the compiler itself?
>>
>>107101471
because that's basically what you do when you have nothing better to do. it's just an undertaking for the sake of it. self hosting literally does not matter. it doesn't make a language intrinsically better or worse
>>
>>107101593
your COPE attempts are very weak lol
>this is the best language ever
>>really? what is its value proposition
>it supports data-oriented programming
>>nigger, anyone with a brain never fell for the oop meme to begin with
>>tell me it's good enough for writing its own compiler at least
>no. that's autism. it's written in c++
lmao
>>
>>107097729
dont they do insane physics simulations and rendering with odin? if you can do good physics simulation in real time you can argue that it is general purpose because you can do any other mathematical operation as well, hence, general purpose.
>>
>>107101151
having internal hidden magic which generates code you never see is effectively the same as trusting an implicit judgment. by comparison the odin recommendation to create a custom external pipeline (an odin program to generate odin code) is more explicit by letting you inspect and control the process up until compilation, and the compiler's job is only compiling.
>>
Punctuation is used as a crutch for people who can't write a good parser. Bad syntax usually comes from that.
>>
>>107097729
> https://odin-lang.org/docs/faq/
>>
>>107103066
how is that meaningfully different from a compiler optimizing machine code?
>>
>>107095211
I love zig but last time I touched it, it was overly convoluted to just import a lib from github



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.