20 Dec 2023 |
Raph | lets talk about Odin | 19:43:49 |
Raph | been reading about it, it's quite the contrarian language | 19:44:01 |
doctorcringephd | well then it must be good | 20:06:36 |
doctorcringephd | to disagree is the sign of quality | 20:06:55 |
galacticcolourisation | weren't you really excited about zig at some point? | 20:09:07 |
Raph | still am, and follow it around a bit | 20:11:10 |
Raph | but decided to look at odin to see what's the fuss | 20:11:31 |
galacticcolourisation | hmm i c | 20:12:01 |
Raph | some hot takes from odin: - nulls are just fine - we don't need methods, data and code should be separate (basically return to monke, with C like namespace besides the package system's) - build systems suck, we don't need it (they have some in language constructs that help and the compiler instead aids u with everything) - errors as special constructs are not good enough - we don't need macros | 20:20:15 |
Raph | it's also statement based instead of being expressions like what seems to be for most of the new languages | 20:20:41 |
doctorcringephd | death to macros and portugal | 20:20:43 |
Raph | funny thing tho | 20:20:58 |
Raph | they ended up doing a lot of what zig did as well | 20:21:06 |
Raph | with stuff like manypointers, custom allocators, etc | 20:21:23 |
Raph | the language is bri'ish | 20:21:30 |
doctorcringephd | fisherman lie | 20:21:49 |
doctorcringephd | like an australian | 20:22:21 |
Raph | ighty | 20:22:53 |
galacticcolourisation | the first hot take is awful the second hot take is useless the third hot take is god awful the fourth hot take needs elaboration the fifth hot take probably makes procedural code worse | 20:25:59 |
Raph | 1. he claims that most of the time null errors are easy to spot and that null errors are just regular memory errors
2. it just means that the language is very procedural, idk, I don't have an opinion on that as I've long lost to my C stockholm syndrome
3. yeah no build system sounds weird, but from the little I've messed with the language it's a bit like go's compiler where it compiles everything for you in one go, there's a language construct that will automatically link u to C libraries other than that you'd have to use maybe a makefile or a script to pass in flags to the compiler
4. instead of having an error type like zig's error or rust's Option<T> and Result<T> it does multiple returns with the last return value being an error of any type you want and there's syntax sugar for it like or_else , or_return and .?
5. there's constructs for comptime conditionals with when , there's also support for generics and const generics | 20:49:15 |
galacticcolourisation | for the first claim, it's provably and completely stupid | 20:49:24 |
galacticcolourisation | Go does have a build system, compiling everything in one go doesn't mean it's not a build system | 20:49:45 |
galacticcolourisation | no matter what it'll have some sort of build system, even if it isn't a compiled language | 20:50:12 |
galacticcolourisation | the fourth point demonstrates the most awful way to handle errors | 20:50:47 |
galacticcolourisation | for the fifth point, those are non-syntactic macros | 20:51:10 |
Raph | yes ik, I'm saying that there's no build system but the compiler uses the same package system as go to compile instead of having to make objects and linking them together | 20:51:35 |
Raph | the compiler also automatically links C dependencies | 20:51:44 |
Raph | I haven't looked enough into odin to know how projects are commonly managing dependencies | 20:52:03 |
Raph | you don't like the way zig does errors? | 20:52:38 |
Raph | it's basically that, but if you don't use it you'll have to manually handle them like in go | 20:52:55 |