What is your favourite Odin feature?

I really like the convenience of the vendor libs and I also like not having to call vcvarsall.bat before starting to program and not having to know/use a thousand compiler flags in most cases. Convenience in general.

1 Like

I like that all the things that I used to do as best practices in C are the default in Odin. I also like that Odin implements many of the things I used to custom-build in C, and it is done exactly how I want it.

Stuff like:

  • Zero is initialized
  • Custom allocators and temp allocators
  • Tracking allocator
  • Designated initializers
12 Likes

My favourite Odin feature is @gingerBill as a BDFL, saying NO to “feature” requests, keeping the language as clean and productive as possible.

10 Likes
  • Bit sets
  • Enumerated arrays
  • defer
  • Array programming
  • Package system
  • Terseness & simplicity
  • Default temporary allocator
  • Batteries-included philosophy
  • Little to no friction

It almost feels like using a high-level language, yet with all the power & control you’ll ever need.

2 Likes

For sure using just doing so easily composition of types is amazing.
It allows for some quite amazing constructs.

I also like the builtin tagged union is so convenient.

And defer is basically the unique answer to i don’t use RAII stuff but just say when i want to scope kill something.

1 Like

Not sure if it counts because it’s technically part of the compiler and not of the language itself, but odin doc. It’s not only great for seeing what’s in your own project (it’s what I like about header files in C. You get an overview of what’s inside), it’s also great as an offline doc viewer. I find myself doing odin doc /lib/odin/core/<package> -short | less regularly if I’m looking for the name or signature of a procedure.

(I do realize this thread is over a year old but I didn’t want to open a new one just for this statement.)

3 Likes