V - Best Programming Language to Learn in 2023?
Vložit
- čas přidán 6. 07. 2024
- A walkthrough of what the V programming language is, what it aims to become, and what the current state of its community is.
---
Stuff I use to make these videos - I absolutely love all of these products. Using these links is an easy way to support the channel, thank you so much if you do so!!!
Camera: Canon EOS R5 amzn.to/3CCrxzl
Monitor: Dell U4914DW 49in amzn.to/3MJV1jx
Keyboard: Keychron Q1 amzn.to/3YkJNrB
SSD for Video Editing: VectoTech Rapid 8TB amzn.to/3hXz9TM
Microphone 1: Rode NT1-A amzn.to/3vWM4gL
Microphone 2: Seinheiser 416 amzn.to/3Fkti60
Microphone Interface: Focusrite Clarett+ 2Pre amzn.to/3J5dy7S
Tripod: JOBY GorillaPod 5K amzn.to/3JaPxMA
Mouse: Razer DeathAdder amzn.to/3J9fYCf
Computer: 2021 Macbook Pro amzn.to/3J7FXtW
Lens: Canon RF24mm F1.8 Macro is STM Lens amzn.to/3UUs1bB
Caffeine: High Brew Cold Brew Coffee amzn.to/3hXyx0q
More Caffeine: Monster Energy Juice, Pipeline Punch amzn.to/3Czmfox
Building A Second Brain book: amzn.to/3cIShWf - Věda a technologie
ERRATA: At around 7:00, I explain what the vision for autofree is. I say that it aims to automatically distinguish between cases where something needs to be deallocated at the end of the scope it was defined in, and cases where runtime reference counting is needed. But I skirted over one of its core value props - and that is that it aims to determine at compile time when memory is no longer needed and deallocate that memory, even when that place is not in the same scope where the memory was allocated. The claim is that it can do this *without* a runtime reference count in the vast majority of scenarios, but will fall back to runtime reference counting in the cases where it can't.
Don't forget to pin this comment.
@@fionawashere1086 ahh thanks for pointing this out! Pinned.
Objective C has been around for nearly 40 years and for most -- if not all -- of its lifetime it's had the autorelease that the dev invokes manually. The boundary conditions are pretty clear: values declared in local scope / stack that are not assigned to references that exist beyond that scope. In ref-counted systems, it's a +1 ref count followed immediately by a -1 so that it's at 0. then when scope ends, it gets freed.
@@godofbiscuitssf Right - I think the novel thing here that memory is freed when it is no longer needed, even if that is prior to or after the end of the scope where the memory was allocated and even if there are multiple references to it - in many cases without even needing an RC.
@@codetothemoon does this differ to ARC in Swift and Objective C? Because I was describing the situation before ARC came along. ARC has been around quite some time now.
As a Go programmer I think I already know V
exactly, so similar
selective variable capturing by closures is dope, though
The docs say you should
Go++
that was my very same thought when he started coding V.
Been following it for a few years now, and it doesn't ever seems to be moving along as quickly as its claims do. Pretty uninteresting when the field is filled with so many great languages currently.
The author of it lied about a lot of it's features iirc
C++ smart pointers (unique_ptr and shared_prt) exist and have existed in the standard for over a decade now (2011) and have existed in the boost library for almost 2 decades (2004). They handle the freeing for when the variable goes out of scope.
Yes you can also use manual new/delete and manual malloc/free but you only rarely actually have to do that and usually _shouldn't_ do that.
imo c++ isn’t so bad language as it described by rustaceans , I think it’s easy to avoid memory issues now.
Aren't those using reference counting, though?
@@mister-ace thread safety tho
@@SkyyySi shared_ptr is ref-counted, but unique_ptr isn't, and only uses language features (destructor, deleted copy ctor, custom move ctor) to implement it's functionality
@@chiragsingla. relatively new to the standard but atomic shared pointers also exist. They were added as a TS in 2016 introduced into the main draft in 2017 and are in the standard as of C++20. Also if you can't use C++20 for a project boost has also had them since at least 2017
That's a really good video, keep it up!
thank you!
Hmmm, I did not know, it appears to have some curious problems with this approach of using ref-counting automatically, it makes the code very less explicit than it proably should be, and I wonder if the switch from autofree to manual memory management wouldn't hurt a lot when people actually need to change. It is surely an interesting language, but I think it is not, at least for now when it is not stable yet, worth learning more than other already working languages, maybe in the future it could be great.
It's like Go and Rust had a baby - very slick language, I really dig its design! Very smart and pragmatic choices all over the place! Thanks so much for the intro, I learned a lot and might give it another shot! I had a look a couple of years ago, it was already very promising back then but it still was very immature.
I had exactly the same thoughts. It looks syntactically similar to go and got some variables from Rust. Since it is transpiling to C code, it could be potentially used for bare metal programming in a go-style.
Am I the only one who thinks this video is going a bit too fast? Great content but it would be nice to see the code at the end for a few seconds before it cutting away to the next part. Had to watch it in .75 speed and pause constantly
I don't think you're the only one. It's very tricky getting the pacing right so that folks stay engaged but the video doesn't become confusing. Probably one of the most difficult aspects of doing YT 😕
@@codetothemoon you should leave a 0.5-1 sec part before transitioning/sliding to the next part of the video.I can t even read the code on the screen and listen to the talk without pausing the video.
@@kivimangoproductions9655 💯 Take your time! I think your core audience is not teens with an attention span for tiktok shorts.
Very interesting! I'm also wondering how the autofree works. I'm a little concerned that it conceals potential leaks by circular references without the user knowing from just looking at the code. Or just very late freeing of objects.
From what I found on the reddit discussion and other places in the internet, that's the current situation, at the moment it cannot guarantee that no leaks will happen for a 100% of the cases (although that's the goal), that's why the --autofree flag ships with the GC anyway for that 10% of the cases when autofree missed some borrowing at compile time.
There's also a discussion (not for v specific) about optimized, multi-core GCs that could outperform by miles the current implementations, which could mean that this current mix of autofree and a gc might not even be a bad choice, as that could work best for cases where memory deallocation occurs frequently. Ultimately, the goal would be to find a balance between performance, predictability, and ease of use.
It leaks in a hello world. This project is vaporware.
@@gagagero Are you talking about a blog post from 2019 or from a recent, 2023 test with autofree+gc?
(currently, it doesn’t)
@@fdimb A friend of mine tested it a few days ago, it leaks.
Now that you mention Nim, I really feel it deserves a lot more attention, hopefully you can dive into it with some practical examples.
absolutely, I'm hoping to dive further into nim. I've only worked with it very briefly but I found it to be very enjoyable
I agree. Nim is a good language. V is promising, but Nim is already good. I think V has the advantage that it’s syntax is very go-like.
There is a published book by Manning on Nim: “Nim in Action”! I Think this is a sign of its maturity.
I liked V at first sight, but I also had an impression it’s memory management was not fully implemented yet! I got quite suspicious after that (3 years ago).
On the other hand I reckon that Nim is already used in commercial projects.
But as a Java developer switching tech stack, I’m focusing all my energies on Go: a much safer bet than Nim or V.
@@a0um There is also Mastering Nim book by the language creator Andreas Rumpf, physical version only. I have yet to get that one.
Nim also has ARC memory management that's becoming default in 2.0 (current devel).
This is interesting - I'm guessing they only add reference counting where needed. Given that, I'm curious whether they handle some of the tricky scenarios where reference counting actually isn't needed, but maybe a naive compiler would think it is needed.
As a go programmer I already feel entitled to try it, thanks for such a detailed video.
Also, what colorscheme are you using in your editor? Monokai? Looks so calm and classy.
Yeah I think the Go crowd will feel right at home with V. Good guess, I'm using doom-monokai-pro 😎
What font are you using for doom emacs?
I'd stick and improve my skills with Rust than learning another language.
wouldn't fault you for doing so! there's definitely a cost associated with always diving into the bleeding edge stuff that has an uncertain future. There's something to be said for keeping your focus on one thing and not getting distracted!
@@codetothemoon Exactly! Thank you.
Thanks, never heard of this language before!
Happy I was able to get it on your radar! It wasn't on mine either until very recently
We're in the age of too many similar programming languages. - Do we even need more at this point?
What font are you using?
Swift / Obj-C are great examples of ARC that really, really work. It's totally possible, although I'm sure it's tricky to get right
This is interesting - I wonder if there is a gap between what they do and what autofree aims to do. Because I think they have acceptable performance but definitely aren't known for top tier performance.
Cool video. What font are you using ?
Monaco 😎
Haha, the mascot is indeed better :D
💯
Great video learned a lot, bro can you please tell me what extension your using to add that sound effect when your typing the code. It sounds too good
Nice glad you got something out of it! I actually just mic up the keyboard when I'm recording myself typing.
@@codetothemoon what keyboard you use?? It really sounds good
Hi, it's like an all in one,universal language so far with aspects of the other languages.Illmake sure I learn V as well. Cool. Thanks for the well explained video as I'm new to programming and am learning SO much it's getting addictive 😅I love to code!
Thanks Rachel, congrats on starting your programming journey! I share your passion for it, and feel gratitude every day for the opportunity to be a practitioner
Cool might actually learn it. what's the font name and theme you have!
font is Monaco and theme is doom-monokai-pro
May I ask what font you are using in the editor?
Monaco
Funny you posted this video I bought the book last weekend, very promising but there are some bits I'm still not sold on.
Which book?
@@bexplosion "Getting Started with V Programming."
3:40 that looks a lot like captures in c++ lambdas. Looking at the doc's they are similar just that they don't support wildcards and are always capture by copy.
The docs for function captures also showcase that references in V are in themselves also basically just pointers that if you copy you get another reference instead of a copy of the underlying object which I don't really like.
Interesting video, although it reminds me a lot of Go, thank you anyways! Could you review Crystal lang next?
Thanks! I actually took a brief look at Crystal in the video "Rust vs 7 other languages you probably haven't tried". I was extremely impressed with it during the brief time I used it, i'm hoping to get more time with it at some point.
Thanks for trying V, and for the unbiased review about it.
Thanks for watching! Glad it came off as unbiased, that's exactly what I was going for.
I loved explicit closure params. All the other, idk, it’s confusing to be able doing similar things in many different ways, reminds me ruby
Hi, can you pinpoint what exactly you found confusing?
Last time I used it, year ago or so, it compiled not working code, even if syntactilly it was correct. Telling from various readmes that list projects in V it is ORM, GUI and freakin Linux replacement and others. Without fully working and documented compiler. What the hell went wrong
A lot of people saying it's like Go++ but if it doesn't have the Go standard library, it's more like Go--
haha! yeah i think the next logical step would be to do a deep dive comparison of V and Go, and take a look at language features, performance, ecosystem, etc. When I made this video I didn't realize the full extent of V's similarity to Go
what font do you use for emacs?
I believe it is Monaco
It’s just a weirder go with a really fast compiler
really loving the videos, btw what editor do you use
thank you, glad you're getting something out of them! I'm using DOOM Emacs
@@codetothemoon thanks
@@codetothemoon thanks, i forgot to ask the font and theme also
What is that font tho? it's so nice
Concurrency support? Does it have channels and v-routines like golang?
Yes it does. It uses the go keyword for them haha
The koka programming language claims to have achieved something similar to the autofree feature mentioned in this video
Thought I'd heard of all the new bleeding edge languages at this point, but this is the first I've heard of Koka. Thanks for the mentioning it, I've added it to my "to check out" list!
@@codetothemoon the effects system feature that was talked about a couple of blog posts ago in Rust is possible that it originates from Koka
@@codetothemoon To me Koka seems like a purely functional Rust. If I'm being honest some of what I've seen goes straight over my head but it has some amazing ideas.
which font are you using in this video?
I believe it was Monaco!
A huge problem I see with V is target audience. If I'm okay with slight performance compromises (garbage collection/autofree) I can use Go or target WASM. If I need C-like performance I want full control over memory management, which makes Zig or Rust preferrable. How is V supposed to compete?
Also, autofree is a huge challenge and will likely influence the language's design, delaying it in favor of GUI features etc seems like a questionable order of priorities.
they should introduce an option to disable it
@@holthuizenoemoet591 You can. But then what's the point of a language that doesn't provide actual value? Not that autofree does this anyway. But the syntax is nothing to run home for. So what is?
V is compiled to C so every lib written in C can be used in V and (almost) be converted to V. Development time is very fast and you can learn everything of the language in an hour
I work in cyber security and the language helps me write code fast like python, but with the performance and control of C.Also inline assembly code is a plus for me.
it could be usefull in science where you want quick prototyping but also dont necessarily want to deal with the slowness of some interpreted languages (I am looking at you Python)
What font and theme are you use?
Monaco and doom-monokai-pro
That clojure syntax is criminal
Yes
Partly looks like Clojure.
Isn't the same as in C++?
What is the font used? The parentheses are gorgeous!
Thanks, it's Monaco!
@@codetothemoon Thanks!
what is the color scheme you are using?
Monokai Pro
A question: Can V to programming for Esp8266 or esp32 boards?
seems possible if it compiles initially to C anyway.
With Arduino it shouldn't be a huge issue.
However with ESP-IDF it might be a bit difficult adding bindings for all the IDF functions especially considering that the available functions change depending on the IDF config. It should be possible as we also see with Rust bindings. But some features might be unavailable without falling back to C and the IDE support might not be great depending on how the tool chain will handle that case.
the idea seems cool, will wait to see how it evolves. a bit strange to incorporate gui right into when it is on version 0.4
agree, wouldn't fault anyone for holding off until it gets a bit more mature
What is the name of the font you are using?
Monaco
Hey, can you tell us what theme and font you're using?
doom-monokai-pro and Monaco
@@codetothemoon amazing, thank you a lot. Loved the video by the way!
ok I like the idea but already hate the syntax after just the first minute - don't know exactly why - maybe it is just hard to read what exactly is going on because I am not used to it
especially the := vs = just feels wrong - what's wrong with a declaration keyword?
and damn the closures look ugly / hard to read
Also for some reason I have a lot of difficulty with programming languages that leave the brackets around conditions (but that is a me-issue I guess)
I was a bit confused with memory handling when passing a variable (non-reference) into a scope/function. Is this variable moved into scope? Is it copied? Is this a mutable reference? This moment is unclear tbh, and not well described in docs.
In GC languages you pass a reference, in Rust it depends on the annotation, in V lang it depends on the... scope??? I'd really appreciate an explanation to this memory behavior
Currently V depend on entirely GC, but you can enable auto free and that inserts most of the necessary free calls in your code during compilation time. The rest is handled by GC
So when you would allocate a variable on the heap V inserts a free call in the code during compilation time. So at runtime the program is faster and it won’t leak memory, because the other cases are handled by a GC
0:48 whats arena allocation
What coding font and theme is that?
Monaco and doom-monokai-pro
The syntax reminds me a lot of go. I wonder if it also copies the bits of go that are absolute genius? (channels, goroutines, duck typing for interfaces etc)
that's a great question - I didn't encounter any of the features you mention, though I could have overlooked them.
There are channels, and OS threads for now, goroutines/green threads are planned, but not implemented yet. Starting a new OS thread is done similar to Go, with `spawn fn() { println('hello') }`, launching a new green thread will use `go fn() { println('hello') }` .
Duck typing for interfaces is also already supported.
LOVE YOUR VIDEOS. + 2 questions:
1. will you make a video about c++?
2. the code's font is insanely beautiful, what it's name?
1. Not sure about C++, it was my first language but it is also one of my least favorite. It'll be around for a very long time but it doesn't really seem to be a nucleus of innovation at the moment
2. Thanks, it's Monaco!
I'd really like to see a Nim video. For some intangible reason, I feel like Nim is more solid than V. I think maybe it's because the tutorials just didn't compile or behave as advertised when I went through them. I wasn't able to get Doom to work, etc.
Would love to see a video on Nim as well
Would love to make one, feels like that's one of the main centers of innovation in the elusive goal of terse syntax + memory safety + optimal performance
@@codetothemoon True that
Hei V vs Val vs Circle ?
Can y m ?
Are the sounds made by your real keyboard? If so, what is it?
i wonder why that matters lol
@@reinhold1616 Cause they are really nice and I want to buy it!
Apple platforms with Objective C and Swift have had ARC (automatic reference counting) for a decade. before that, Objective C had manual reference counting with semi-automatic reference counting using autorelease pools.
the LLVM front-end, Clang, inserts allocs and deallocs into the code on your behalf with each trip through the compiler, not as part of your source code. No performance hit above what manual memory management would cost you otherwise, and autorelease pools would in many circumstances *improve* performance by allowing you to use/reuse local memory pools (say, within tighter loops) that you could free up upon exiting scope or keep around but clear out if you know you're going to reuse it.
But like I said, a decade or more.
At 7:00 I left out a key piece about what's I think is novel about autofree, as compared to the languages you mention. Check out the pinned comment - basically I think (again, the documentation on this is harder to come by than it should be) it aims to also do something like Rust's borrow checking and ownership changes, but without requiring the developer to be involved in them. Long story short, I believe the aim is to take some of the cases that would require RC in the languages you refer to, and eliminate the need for that RC. Without this, I'm not sure if there would be much to see here.
Autofree will likely have problems just like garbage collection. The performance of a program will depend on V compiler version, where some values are stack allocated, heap allocated etc.
Golang does the exact same thing with its analysis, golang and V are on the same playing field.
I think the goal of autofree is to not have the same performance issues as garbage collection, remains to be seen whether that will be achieved.
Re: Golang, regardless of the static analysis done at compile time, you'll still have the overhead of the garbage collector right?
@@codetothemoon If you don't create pointers in Golang there's no garbage to collect, and if compiler detects with escape analysis that variables can be freed in the same scope it essentially becomes stack allocated, essentially what happens in autofree. I don't think there's any real solution to Rust's ownership model today.
Does that font exist in vscode? I guess you are using vim.
It should (it's Monaco) you should be able to get a similar theme as well (Monokai)
I still prefer switching each transistor manually, or if it HAS to be super high level like V, ill just use asm
lol that's next level 😎
What font do you use?
Monaco 😎
@@codetothemoon thanks! really good video my guy
6:17 - 7:00 - rust objects just copied (arc/rc are reference counted objects, that contains heap-allocated memory-blocks with objects inside), - there is no heap allocations for stack-allocated objects, - it's not the same as in C/C++ giving a pointer to heap-allocated memory block.
You say C program to V but the code is C++, is it possible too to pass from C++ to V automatically?
you're right! This was an example pulled directly from the V website where it talks about C to V conversion, and I hadn't even realized that the code was C++. Upon taking another look, it actually says that C++ to V is currently under development as well
What is the name of the theme in doom emacs?
doom-monokai-pro
@@codetothemoon tnx
4:47 there's 2 assert statements, the last one says "should fail". Then you run the tests but the tests all pass? How? :D
yeah, I think I used the wrong clip there. The Primeagen pointed this out in hilarious fashion here czcams.com/video/j47Hk5qE9As/video.html
Wait, if it uses reference counting, how does it manage objects referencing themselves ?
That’s a reference cycle and will be not collected unless the developer replaces one of the references with a weak one. I know that from Swift which uses RC too.
@@mihaimanole2643 Yes, but I was wondering that because you can't simply use this auto ref counting blindly then, and it's even more problematic that if you don't know if a variale wilol be freed at the end of a method or by rc, then how can you manage cases like that
@@alathreon8315 I guess you must do some tests and use some tools that inspect the memory leakage or use Rust if you want memory safety.
-_-
One (costly and very similar to gc) option is to group together circularly-referencing objects into a collective reference counter, which will free all of those objects if it reaches zero. You could also track how many references to and from the collective Rc each object has, so you can dynamically remove it from the collective Rc
It is just straight up incredible how fast V developes, literally a year ago and there was like nothing, almost no docs and such.
How fast it develops is a little misleading, since it's still nowhere near it's initial promises.
it doesn't develop that fast. I've been following it for 4 years. I quit looking at it because in those four years, it feels like it's made no progress toward becoming what it promises, and they keep adding language-nonessential library features instead of actually working on the features that they initially used to draw in devs.
Using it feels too broken to even consider doing a hobby project in it.
Actually in 2020 the main docs were there.
@@nicktreleaven4119 main docs are pointless when the features themselves are incomplete
@@andrewrobinson2985 far from pointless. They documented what was implemented so far and what was planned at the time
Could you do a video on sql and v, please?
maybe!
as a Go developer this seems pretty promising!
there definitely seems to be a strong Go influence on the language!
I love Rust, but Vs ? operator representing either an option or an error is really nice.
Does V support macros like lisp?
I'm pretty sure it does not
don't think so, but not 100% sure
I'm confused as to why you said that it converts C to V while you showed C++, and what's more is the output didn't actually match the input functionally. The V code built up a string and then printed in one go while the C++ printed as it went. As for V itself, it just looks like a less awful syntax version of Rust. One of the things I hate about Rust is the inconsistency in syntax, but the manual interventions you have to take as the programmer that C++ doesn't make you take really irks me. I've always hated C++, despite loving certain features, but the more of Rust I learn and the more of the source code for its implementation I read, the more I despise Rust. In fact, the more I learn of other languages, the more I appreciate the cold, calculating consistency of C++. It's butt ugly, but it does a lot right that other languages really screw up. That said, I still prefer C over everything else and use it for nearly every personal project.
The sound of your switches makes my brain vibrate
Edit: its a good thing
If you're referring to the keyboard switches, watch out for the next video this week, you might like it 😎
I hate having to explicitly declare a field as required, as opposed to explicitly declaring a default value. It's so much cleaner if you know exactly what a field's default value would be if you don't specify it otherwise on initialization. The required keyword feels exactly like the bolted on solution they are currently adding to C#.
In V you can also declare default values for fields
@@petrmakhnev4037 That's great but I still feel like the default behavior of having an initialized struct while some fields or all its fields can remain uninitialzied, is bad default behavior.
@@PaulSebastianM All fields are initialized to zero-value by default, 0 for numbers, empty string for strings, and so on.
You recommend to learn this language?
Depends on your specific situation - if you're a programming language geek and enjoy learning bleeding edge languages, have at it. But if need something that will work for you right away, I think your time might be better spent learning something like Rust or nim. The nice part is that learning V isn't a huge commitment - it's a very easy language to pick up (like its main source of inspiration, Go)
@@codetothemoon Okay thanks, I know rust before but im searching languages easy and fast like rust, V was my first look language
Autofree will take decades and decades to be perfect
That appears to be a concern shared by many folks!
Personally I think zig has more promise because the creators behind v seem to be somewhat hostile towards their own community. As you highlighted at the end of the video, there have been quite a few controversial decisions with this language. The thing is, autofree doesn't actually seem that farfetched if the compiler can assign lifetimes to variables under the hood. In this way you'd effectively have ownership but you wouldn't have to worry about the borrow checker because the compiler would determine if the object can be dropped by scope or if it needs reference counting. That being said, I'm not confident in the v contributors to be able to properly implement this feature. Zig on the other hand has multiple memory management schemes and it has already delivered on a lot of the promises that the language originally promoted. Another language that is really exciting in 2023 is ocaml. There have been so many cool editions to that language recently which make it very appealing for anybody who uses rust or go.
Doesn't look that interesting to me tbh. I didn't really see something that really sets it apart in a useful way and the syntax seems worse. Explicitly capturing and using fn keywords for closures & lambdas are annoying to me.
Haskell's function/closure definitions = sublime because everything is a function :)
@@leeroyjenkins0 I don't think people would add it to rust. The solution that's described in the video would have a serious runtime impact, and making it a default in rust would go against the language's philosophy.
That being said, a Rust version of Rc that automatically optimizes away the Rc would be nice, and would lead to an easier experience using the language for newcomers. Or maybe a clippy warning that an Rc can be optimized away manually.
Who does have the better mascot between Go and V?
V
This is really cool! Would love to see more examples of the V language in the future
There are tons of examples in the examples folred in V. Clone it and take a look on them.
I hope to cover it more as the language grows in maturity!
Autofree is just like the Objective-C and i guess Swift compiler tries to do it's release/retain optimizations.
great video and all, but at 0:23 you said "an entire c project" and then showed c++ code
In C++ you would use `std::unique_ptr` not `new`
Thanks for the review. As a young language, V has many problems, some of them are being solved, some of them are not yet. Such reviews will help the language to become more known and attract more people interested in the development and improvement of languages.
Calling people for questions about memory management and speed like C as trolls is a known problem, but as far as I can see it is already much less, although there are people like the author of that comment who spoil the impression of the language, which is very sad.
I think in 3-4 years we will get a good language with its own advantages and disadvantages. Let's see how it goes.
0:38 "Looks like Go..." Hmm, yeah, looks like Go except kinda oxidized, converting the semireadable fragment "func" to an unpronounceable utterance "fn" and requiring every variable to be prefixed with "mut" to vary.
hah yeah I think some aspects of it will make Rust devs feel more at home than they will for Go devs
1:48, ouch! I don't want to specify the returning type! 3:03, ouch! I want this to be automatic!
6:31, std::unique_ptr frees that memory automatically. 6:42, C++'s std::shared_prt is meant for this RC.
6:55, are you saying 'deallocate' meaning 'free from stack' too? Because in C++ things are build on stack by default. For instance: auto a = Thing. It's recommended freeing the stack as soon as possible, because it's precious memory, as small as faster.
Tried V, still defaulted back to Zig. There's just something about Zig that makes it a joy to work with.
out of curiosity - why do you choose Zig over something like Rust? I feel like I'm missing some pieces of the Zig puzzle and am eager to learn from those who are immersed in it.
@@codetothemoon Aw, my bad. I actually love both Rust and Zig. It just so happens that Zig is a lot easier and simpler for me to work with, compared to Rust.
As a worn out C++ dev with horrendous nightmares of failed projects 😅, Rust and Zig gave me a chance to redeem myself. I'm in my 40s now, so I highly gravitate towards simplicity and ease of use.
I'm really rooting for V to get to 1.0, until then I really hope the LSP support gets better, so I can have a better time playing with it
I was so excited about language but totally lost interest after realizing that it doesn't have a good memory management and it's not clear what they are really doing about it. I switched to Rust and it's good.
can't go wrong with Rust. I agree that it doesn't seem ultra clear how they are going to get to where they intend to go in terms of memory management.
3:27 this is so good
If a programmer can do a certain task manually there is only a question of time before the computer will become better at it. Just like compilers usually write better assembly than humans can, in the future computers will be better at parallelising and doing memory management than any human can. If a human can do it, then a computer can do it, it's that simple. The question is how long time will that take? Im guessing it will probably be between 6-12 years. But it could be sooner with the advancements in AI. “You insist that there is something a machine cannot do. If you tell me precisely what it is a machine cannot do, then I can always make a machine which will do just that.”
- John von Neumann
yes, I do feel like there is a bit of an existential threat to software developers at least in the current form of the role. Best case is that AI innovations will cause the role to change in nature. But I think there's a real possibility things could turn out worse...
@@codetothemoon Agree. But at the same time, chess software will beat any human player regardless of skill easily. Even if AI will become better at memory management, or even writing entire programs we can still enjoy programming. People chop wood, fish, program in old assembly language(like NES ect.). I believe in the transition period where computers need some steering from humans it will be very enjoyable. Our productivity will increase tremendously, but at the same time we can have the satisfaction of bringing something new to this world. Btw this is a great channel!
Elixir is really nice, too.
i was very impressed with it in the brief time that I tried it
C with colsures. All the other features look great but that's all I need. All it needs now is a repl like Holy-C has. Then it would be good enough to take over an operating system.
Why file extension is ".v" ?????
I think because the language ls called V, similar to how C source has a .c extension
@@codetothemoon That is a problem, since .v file is the file extension of Verilog.
Syntax is like Rust and Go made a baby
i will wait until it gets into 1.0 to test it
wouldn't talk you out of that!
What about VVVV?
I hadn't heard of this, thanks for pointing it out!
so syntax like Go :D
V is pretty cool
it's worth keeping an eye on!