This is like a mix of Go and Jai. Kudos though, been following for a long time
@carlsmith8593
Жыл бұрын
Odin is awesome. It really feels like high-level, portable assembly. If you know how hardware and software work, there's not much else to it.
@Lidarix
Жыл бұрын
Just started my journey to becoming a general programmer with your creation ! Thanks for your work on Odin ;) Keep going !🤘
@TechnologyBudda
2 жыл бұрын
IMO the language would be flawless with some kind of compile time execution and that could be used to execute custom builds (insert language name here for language wars idgaf. Odin looks great and I think this feature would be useful to it)
@tango2olo
Жыл бұрын
Sensible talk. Looking forward to get a hands on this. Thanks a lot. All any programmer wants is to express himself in the most crisp way possible. Simplicity, readability and performance is all I need.
@ChaosEater39
Жыл бұрын
Very cool dude! I really wanted a good programming language that is not based on anything else except its own back and this is the right thing for me!
@victornoagbodji
2 жыл бұрын
This is a fantastic overview of the language! Thank you 😊
@tech6hutch
3 жыл бұрын
I see you’re a big fan of Jonathan Blow
@madscientist7430
3 жыл бұрын
Your username does not disappoint
@Nenad_bZmaj
6 ай бұрын
Oh, how easy it is to switch from using Go to Odin. Almost as if i don't have to learn a new language syntax, so I can focus immediately on semantics. It is, too, very intuitive. A remark on syntax: Why do you need right arrow in front of the output types in a procedure signature? Why not omitting it?
@konstantinrebrov675
3 ай бұрын
Your syntax for pointers in Odin looks very similar to "handles" in C++/CLI, Microsoft's proprietary set of language extensions to C++, meaning a garbage collected object that is deallocated by the Windows runtime via a reference counting mechanism. It's also called "managed" C++, because these objects are dynamically allocated on a special section of the heap, or a certain different heap, that is managed by the Microsoft garbage collector algorithm.
@GingerGames
3 ай бұрын
Odin's pointer syntax comes from Pascal. Microsoft probably took the idea from the same source, or just looked for another symbol because `*` was already taken.
@samuellotz8304
3 жыл бұрын
Very good! Could you elaborate on how the 'using' statement is good for optimizing memory layouts like you mentioned?
@slugbtye
3 ай бұрын
looks absolutely amazing!
@chopsueysensei
Жыл бұрын
LOOOOL I loved the little "(to the general public)" remark you added to "no other language available today" when explaining using.. how can you be so freaking cynical mate? x'D
@aaronspeedy7780
Жыл бұрын
Yep,. He was talking about Jai I believe
@Hoowwwww
3 жыл бұрын
i tried Zig, i like it a lot, but the language feel very verbose and code bbecome ugly to read, too much noise, so i am looking for an alternative, i don't want to go back to C++ yours seems much cleaner and simple, the fact that you added dynamic array as language features makes things less complicated, the context system is also very nice, in zig i have to constantly pass allocators, it is annoying and feels like i have to constantly repeat myself one other thing i like in odin is operator overloading, i can do math operation on my types with ease, in zig i can't so far it looks very nice and promising! i'll give it a try BUT... there is no language server yet (as far as i know), in zig i was using ZLS with vscode, wich is very nice, makes programming and learning the language much easier do you have plans for such feature?
@GingerGames
3 жыл бұрын
Someone in the community is working on a language server already.
@vladimirkraus1438
3 жыл бұрын
I have got the same impression of zig. I feel it is quite unreadable and unnatural to me. And too much obsessed with comptime, which is something that mostly library authors will use more extensively while normal programmers will use it very rarely. But I still think if they improve the syntax, the language can be very successful.
@hasen_judi
3 жыл бұрын
Odin does not have operator overloading either though
@Hoowwwww
3 жыл бұрын
@@hasen_judi yeah that is what i figured out, which is pretty annoying..
@johnnyblack4261
3 жыл бұрын
@@vladimirkraus1438 To me Zig feels more awkward compared to Rust.
@EdouardTavinor
8 ай бұрын
I think it's quite difficult to take advantage of modern hardware without a runtime. I certainly can only write concurrent code with any real confidence in go's model with closeable channels and lightweight threads. However, this requires a runtime, which increases the binary size.
@thygrrr
11 ай бұрын
At 5:00 - "Minimal: there ought to be one way to write something" At 42:00 - 8 different kinds of sugar to unpack the same struct accessors :D
@BryanChance
Жыл бұрын
I love the simplicity of the design, clean and familiar syntax and constructs. Odin code is really really easy to read. It's easy to see where functions and code blocks start and end. I think this is due to proper use of keyboards like "function" instead fn, or "define" instead def, and "function" instead of "fun" or func. "fun" as abbreviation for function is such stupid choice. And thank Odin, white space and indentations have no affect on code syntax. LOL The "using" and custom control of memory layout using struct is very nice.
@carlsmith8593
Жыл бұрын
Are you talking about the same language?? Odin uses `proc` for functions, and has significant newlines.
@kuroitsuki4076
2 жыл бұрын
i want loki programming language
@GmanGavin1
2 жыл бұрын
2:22 "cool name" pillar for me right there. Like why would I want to use something named after dirty abandoned wet metal?
@geeksuperstar8564
Жыл бұрын
Nice intro, i think we need an update on this.
@thedeemon
3 жыл бұрын
I went to the odin-lang site but couldn't quickly find which platforms it targets. I understand the compiler is available on Linux, Mac and Windows but what if it can also target WebAssembly or ARM64 or x86 (the 32-bit) etc.? Like Zig does, iirc. Also, I didn't hear here anything about metaprogramming or compile time function execution. Does Odin have anything in that department?
@diegoaugusto1561
2 жыл бұрын
It's based on LLVM so it's likely
@spicynoodle7419
3 жыл бұрын
Please tell me there is a Linux compiler for Odin. We've been studying C++ at uni but are moving to Java (yuck). I really like the speed and freedom of C++ but it's huge. I won't be able to keep up with the spec while learning Java and potentially a third language if I find a job. I've been following the development for a while now and it looks like the perfect langue for my personal little system management/hacking/scripting language :'D
@GingerGames
3 жыл бұрын
Odin works on Windows, macOS, and Linux.
@spicynoodle7419
3 жыл бұрын
@@GingerGames I'll start studying it tomorrow :'D
@eduardabramovich1216
Жыл бұрын
I see the lang is still missing networking stuff in the std library, it would be great to have a tooling similar to Zig's. Also it would be great to have a tutorial series showcasing the lang features and capabilities.
@GingerGames
Жыл бұрын
We have networking in the core library. `core:net`
@eduardabramovich1216
Жыл бұрын
@@GingerGames Hmmm, you are right, didn't read well then. thanks. What's the next step for Odin? add more features to the core lib? or just polish the lang until it's ready to be 1.0 ?
@_slier
Жыл бұрын
@@GingerGames but to do any http request, you basically need to deal with socket.. damn, its too hard.. you should put curl in the vendor package
@aqg7vy
3 жыл бұрын
Loving the last example at 41:27, this makes component mix-in a dream, i.e. no longer having to chain access through all the components. wondering if you could do a using on a few select member functions which would allow you to have those interfaces. In addition to that it would automatically bring in the members required for those function interfaces?
@GingerGames
3 жыл бұрын
using is "all or nothing", mostly for simplicity for the user. Allowing select things is most likely not that useful in practice.
@miko007
11 ай бұрын
so, this is basically just jai, but with a caret instead of an asterisk for pointer dereferencing, right? ^^
@skaruts
2 жыл бұрын
Haven't tried Odin yet, but overall I'm pleased with what I see here. I love that it leans on snake_case as a convention, which is objectively more readable (and easier to type) than the overrated alternatives. I'm also very pleased about the simplicity. That's been my disappointment with Nim: it's way too complex for my taste. I'm only not as happy about two things, though: *1-* I'm of the opinion that a for loop should never, ever be a while, and it ought to be outright forbidden as counterproductive, because they are actually different things with different uses, and that should be obvious to the eyes and require zero brain effort to tell apart. Or otherwise, when you're reading someone else's code, you'll have to be paying extra attention to for loops in case one of them isn't a for loop (an iterative loop, as opposed to a conditional loop). However, if for loops cannot be whiles, then, unless you need to check how exactly a specific loop iterates, you can just pay no mind to them and skim through someone's code unconcerned, assured that the fors are just fors and there are no unpredictable surprises. It also makes it an effortless task to find a while loop amidst several fors. *2-* I fear the *using* statement comes with a caveat. There are some people out there who, when you give them a new toy, they'll overuse and misuse the heck out of it, and end up making their code hard to follow (also seen that in Nim a lot). I was looking at an example from the raylib bindings (the ones that are actually outdated -- in the "sprites" example), and their usage of *`using`* forced me to keep scrolling up and down to double-check the type declarations and see what things belonged to which type. Especially because they also do `using` for several things at once in the same function... Personally, I'd use it sparingly, and only in the _"within a type"_ form, which is not so prone to cause confusion (and I can see it actually being useful).
@drygordspellweaver8761
Жыл бұрын
all loops actually are the same, though, underneath the hood. I like how Odin brings this to the forefront. I Agree on point 2 however
@skaruts
Жыл бұрын
@@drygordspellweaver8761 well, my point is that it's a mistake to bring that to the forefront. It's irrelevant how they work internally; for the programmer there's still two different concepts of loops. And when the goal is to make code clearer, then adding the potential for confusion is working against the goal.
@drygordspellweaver8761
Жыл бұрын
@@skaruts nah it's completely relevant how they work internally. It's the programmer's job to understand his language and computing in general. Anyone with a decent modicum of reverse engineering should understand that it's all identical under the hood. If anything, he could have used another word than "for". But that's really not a big issue.
@skaruts
Жыл бұрын
@@drygordspellweaver8761 no, it's not relevant. You're missing the point. And that's neither a realistic nor productive way to think about it. Most workers don't benefit from having a deeper knowledge of how their tools work internally. We're not all required to be jacks of all trades, and neither should we. At a higher level, there are still two different concepts of loops, regardless of how they work internally, and making them look the same only reduces the clarity of the code. I don't think this is difficult to grasp...
@drygordspellweaver8761
Жыл бұрын
@@skaruts I'm not "missing the point". Lol. I am clearly disagreeing with YOUR point, and I have good reasoning to do so. Is it so 'difficult to grasp' that just because you believe something, it is not objective reality or indisputable fact for the rest of humanity? "Most workers don't benefit from having a deeper knowledge of how their tools work internally." And that right there is the thinking to leads to photoshop 2022 taking 10 seconds to load an image. On the contrary- a tradesman should be a MASTER at what he does. A carpenter should understand the grain of the wood, not just cutting it and nailing it together. He should understand the hardness of the teeth of his saw, the penetration depth of his nail gun.... in reality he should understand as much about his tools as possible. "and making them look the same only reduces the clarity of the code" For *you*. It reduces the clarity of the code *for you* because you don't understand a for loop. This isn't difficult to grasp at all.
@regbot4432
2 жыл бұрын
Language is really cool but naming it odin was a mistake. It is basically the same as with rust. When I want to search for something about rust programming language everything is mixed with rust game. Now everything is going to be mixed with norse mythology.. I slowly start to think all this is on purpose haha
@LuaanTi
Жыл бұрын
Rust-the-language is older than Rust-the-game, though :P
@skaruts
Жыл бұрын
Type in "lang" after the language name in those cases (like "odin lang" or "odinlang") . It usually works.
@ska4dragons
5 ай бұрын
Exactly! Every time I search for Python, I get stupid programming stuff!
@stephenkamenar
3 жыл бұрын
go + jai. cool! but why are you required to type a semicolon at the end of every line
@GingerGames
3 жыл бұрын
This is actually a complicated answer. So originally I couldn't figure out a way to make semicolons optional without enforcing a brace style at the language level. I have now figured out how to do it for most popular brace styles. But that's fundamentally the reason.
@stephenkamenar
3 жыл бұрын
@@GingerGames i see. you're talking about braces on newlines? i would've just made that not work. i would've also considered removing braces, like python (but i realize that makes a lot of people uncomfortable for some reason (and maybe makes metaprogramming ugly))
@mayanksaxena3574
2 жыл бұрын
i'm interested to create a game engine in this language
@DrTheRich
2 жыл бұрын
I'm really liking this language, I wonder how hard it would be to make a pythonesc dialect without {} and ; I have dyslexia, and any symbols that can be avoided, add extra confusing for me while reading. I understand most people prefer them, but I'd like to have that option.
@GingerGames
2 жыл бұрын
Unfortunately, that is never going to happen in normal Odin. Whitespace sensitive languages have a lot of problems which is why I did not go that root. If you wanted to do this in your own language, you could, but not normal Odin.
@DrTheRich
2 жыл бұрын
@@GingerGames Oh I wasn't trying to suggest you made it. I was just wondering if it's possible for me or someone else to add to it. Like maybe some auto conversion in a pre-processor that adds the {} and ; back in.. Although I realize that would break code sharing...
@landsgevaer
2 жыл бұрын
33:10 In my opinion, the "asssert" statement should not have three s's, 😉 and "not_in" should be renamed "out".
@GingerGames
2 жыл бұрын
The three S's gives it its charm! (And clearly a typo)
@landsgevaer
2 жыл бұрын
@@GingerGames Added a smiley for clarity. 😉
@krisdabrowski5420
2 жыл бұрын
23:13 missing timestamp for if statement
@danielya8634
2 жыл бұрын
Not sure if automatic dereference is good thing. It is not explicit and looking at code blurs the type of expression
@GingerGames
2 жыл бұрын
It's absolutely fine in practice and for when it has been a problem (which has been EXTREMELY EXTREMELY RARE), it was trivial to catch.
@Lidarix
Жыл бұрын
How can I take input from user?
@adrianojordao4634
2 жыл бұрын
It looks good for what i do in C++, if that math lib have same good FFTs and same good interpolation lib, parelelization, i m sold. It wil be fine for signal processing ;)
@casvanmarcel
3 жыл бұрын
Big like!
@lankim3164
2 жыл бұрын
I'm a fan
@renatzkigab2616
7 ай бұрын
Theirs a big resemblance to Go syntax I dont think this language would survive for many years to come it have legit modern rivals and that is the Rust and Zig and also Carbon which are all in under the terms of language development whose objectives is to put C and C++ out in the limelights of Programming Arena.
@GingerGames
7 ай бұрын
People use C and C++ for different uses, and many people, including myself, prefer C over C++. They are not the same kind language nor are treated as such in practice. Rust is not a C alternative, it's a "Modern C++" alternative with a focus on safety. If you want a simple, small language with a huge amount of control over memory layout and memory allocation, Rust is not the language for you. Odin and Zig are about the same age as each other, target very similar niches, but have very different philosophies behind. I recommend trying both to see which you prefer. As for Carbon, I've done a few videos on that language already, but to summarize the videos: it's a language that is ONLY for Google and pretty much no one else, it won't ever be a replacement for C++ (let alone C).
@marcs9451
Жыл бұрын
very based and fun language
@_indrid_cold_
7 ай бұрын
Should it be called ‘GoDin’ as so much of it looks, to me, like Go. Not bad thing.
@xealit
9 ай бұрын
trusting the programmer could mean to leave the pointer arithmetic in the language alongside the good arrays! ;D
@valkrumprofegh9958
2 жыл бұрын
Where is thor and loki?
@Troyseph
2 жыл бұрын
What was the reasoning for the "defer" keyword? Without using it my gut reaction is that it would just makes it harder to read the execution order, like goto...
@benrogmans
2 жыл бұрын
It helps to ensure that you clean up after using things. In his example he creates an array and writes on the line right below it that it will be deleted: at the end of the procedure
@Troyseph
2 жыл бұрын
@@benrogmans ok, but how is this manual procedure better than C++ style RAII
@APaleDot
2 жыл бұрын
@@Troyseph In C++, if you create an array on the heap, you still have to remember to delete it when the function exits. This leads to errors when you write a function and then add a branch to the function later, it's very easy to forget to delete in that branch. Defer eliminates this error. If you're talking about using smart pointers, then you are losing control over your deallocations which is unacceptable in a performance oriented language.
@Troyseph
2 жыл бұрын
@@APaleDot I'm sorry but I completely disagree, I've been writing high performance embedded C++ in industry for 10 years and I have never had any trouble with smart pointer performance. I have had to write custom allocators on the odd rare occasion, but that is usually for large items in limited memory situations. I can't think of a single occasion where you'd get a bottleneck with allocation and deallocation and not opt for a different optimisation, like a resource pool. To the point actually that we consider new and delete to be a code smell in our code reviews these days.
@APaleDot
2 жыл бұрын
@@Troyseph A resource pool is exactly the kind of optimization I'm talking about for performance. Are you saying you implement pools and arenas like that using smart pointers?
@10bokaj
Жыл бұрын
You sound a lot like Jonathan Blow, where you inspired by him?
@lucasjames8281
2 ай бұрын
He said he was
@bocckoka
2 жыл бұрын
'Trusting the programmer' means an insufficient language. With codebases spanning millions of lines, hundreds of developers, tens of years, trusting the programmer just doesn't cut it. Trusting the programmer doesn't scale.
@GingerGames
2 жыл бұрын
Trusting the programmer means not enforcing my views onto the user about how I think the user ought to program. Languages with "big ideas" about how "solve programming" are forcing the user to design their programs around these "big ideas" which may or may not be a good idea for specific problems.
@bocckoka
2 жыл бұрын
@@GingerGames The choice of using a different language with a different paradigm or set of idioms is always there. No one is forcing anyone to use a particular language. What happens is an exploration of the design space. You may have heard the phrase 'liberties constrain, constraints liberate'. I agree with this. The constraint of not being able to forget unlocking a mutex is pretty liberating.
@GingerGames
2 жыл бұрын
@@bocckoka > The choice of using a different language with a different paradigm or set of idioms is always there You're making quite a lot of assumptions. You cannot have it be "codebases spanning millions of lines" and the ability to change paradigms easily. It should also be noted that Odin is a procedural programming language and not multi-paradigm meaning it is also quite opinionated in some aspects but also not forcing you to structure your program in a certain way like in say an OOP language or Rust. > The constraint of not being able to forget unlocking a mutex is pretty liberating. You can have this easily solved with just having better language features: sync.guard(&m)
@uuu12343
2 жыл бұрын
Looks like a combination of Programming language and Unified Modelling Language Ala Class Diagram 🤔 Variable_name: data type Interesting
@johnnyblack4261
3 жыл бұрын
Hi I am just curious, if Odin makes it harder to "blow my foot", how does it address data races issues and dangling references?
@GingerGames
3 жыл бұрын
Odin is safer than C by default because of many things such as slices (rather than pointer arithmetic) which have bounds checking on by default. But because Odin is designed to be an alternative C on high performance platforms, it will still let you blow your foot off you want to, but a harder than by accident with C.
@johnnyblack4261
3 жыл бұрын
@@GingerGames I see, what about data races though? Rust solves it by preventing the user from having 2 mutable references to a variable, does Odin have some form of protection against data races?
@GingerGames
3 жыл бұрын
@@johnnyblack4261 No. Odin does not have any big ideas about how to solve those issues. How other languages have tried to solve those problems come at a huge cost which I did not want for Odin.
@johnnyblack4261
3 жыл бұрын
@@GingerGames What huge cost does it come with if its solution is not using reference counting nor GC?
@GingerGames
3 жыл бұрын
@@johnnyblack4261 Ownership semantics, restricted language features, different paradigm, performance costs, lack of control over memory layout and memory allocations, etc.
@danielya8634
2 жыл бұрын
Minimalistic approach should eliminate do keyword, just use {}
@GingerGames
2 жыл бұрын
I don't have a minimalist philosophy but I do try to be wasteful. `do` has its use cases which aid in a lot of cases. A good example can be `for x in y do if x > 0 { ... }`
@tullochgorum6323
3 жыл бұрын
New languages that have actually achieved traction, such as Go, Rust and Julia have built communities by focusing on a specific pain point, so they quickly build a critical mass in that field. Julia offers interactive scientific computing, Rust offers compile-time safety, and Go enables quick compilation for large concurrent server projects. None of the mainstream languages could offer these features. On the other hand you have languages like D and Nim and Crystal which haven't really taken off, because all they are offering is a somewhat nicer syntax. Which really doesn't seem to be enough to tear people away from the skill-pool, learning materials, libraries and legacy code of the mainstream languages. I'm not at all clear what compelling pain-point Odin is addressing?
@rolandinnamorato1953
2 жыл бұрын
C++ is the pain point and Zig Odin Jai are looking to replace C++ in every use case where it is used
2 жыл бұрын
@Pablo__4567 There's pain at the beginning but joy after that, and code actually becomes much simpler and straightforward the more you learn to use it.
@skaruts
Жыл бұрын
@ I coded in C++ a few years, and my persoanal experience was pretty much the opposite. There was no pain at the beginning, only excitement. C++ sounded great to me. But then the more I learned it and used it, the more that got inverted... Eventually, after some three years, I just couldn't stand C++ any more. I still have nightmares over those std error messages, among many other things... My experience with rust was even worse, though. The pain started growing really quick. Ditched it within a week.
@maxrinehart4177
Жыл бұрын
@@skaruts Even the man who created Rust commented on how the language diverted from its original goal. Rust becomes so complex it's effectively C++with different syntax.
@LinucNerd
Жыл бұрын
@@maxrinehart4177 source?
@thekillercow586
Жыл бұрын
It seems so much like Go
@asddsa10001
3 жыл бұрын
It is hard to switch from C to these languages even if they are interesting.
@needlessoptions
3 жыл бұрын
How come? They're designed to be more friendly.
@_slier
2 жыл бұрын
why getting started is so hard? why do i need to install visual studio and compile odin from source? can u make it easy like rust or zig, heck even jai? damn
@GingerGames
2 жыл бұрын
You still require a linker and system libraries to link to which even Rust, Zig, and Jai require. Rust and Zig use the LLVM toolchain. Jai I have no idea whatsoever but I think it is the MSVC toolchain still. And if you are developing on Windows, you will require the MSVC toolchain (not necessarily all of Visual Studio) FOR ANY LANGUAGE, not just Odin. If you have any other questions, I highly recommend joining the official Odin Discord Server.
@AndreasHGK
2 жыл бұрын
Godin
@stoomkracht
2 жыл бұрын
Seems like an interesting language. However, tooling is apparently not a part of the project? No preferred editor with code completion, simple refactoring, code jumping, searching, debugging, etc? Imho the editor experience should be a primary part of any modern day language from early on so end-users will actually start being productive in it. Make it so.
@anhta9001
Жыл бұрын
7:22 One CPU clock cycle is so fast that if your brain operates at that speed, light speed seems trivial.
@TheDiner50
3 жыл бұрын
I wonder why you did not go with D? It sounds like a less painful C++. With allot of nice Go stuff. Got it's own compiler and very C like. Like Odin should get some Kudos but I mean I do not understand why D is not more popular? Why or what do Odin do different from D? There probably is some things but what is so bad about D that makes it a non starter? GC? Is that such a big pain spot? Is it just not to avoid using the GC? Just fun to hear what you all think.
@GingerGames
3 жыл бұрын
@Infinium This is the answer!
@spicynoodle7419
3 жыл бұрын
Why use a GC when you can just implement RAII? I mean, memory management can be problematic in some GUI architectures but in general GC is not worth the cost.
@spicynoodle7419
3 жыл бұрын
@@chyza2012 It seems to be much better in Odin compared to C++ tho.
Пікірлер: 139