This is the first good example I've seen of how to use and write inner constructors. Most examples to try to put the inner constructor on one line of code, which, coming from Python and C, is hard for my head to grasp (or use foo and bar, which is as concrete an example as ether).
Please do another video in this series on structs with other containers as fields. I am used to using classes in C++ that have other class objects as members. I would like to see how you do this in Julia. So what happens if you incrementally build on a struct as you process data. You don't have all the data to do a full initialization but defaults will work as placeholders, then modify it as you go. This would mean creating new structs or using mutable structs What about accessing structs as fields: would it be a.b.c[1] sort of thing? I am somewhat disappointed with the Julia documentation on the details of structs and constructors.
So contains can be defined in a similar fashion. s.t. struct Check a::Vector{Float64} end var = Check([1.2, 3.4]) println(var.a) Depending on what kind of container you want, you would redefine the element in your fashion. (:
This is the first good example I've seen of how to use and write inner constructors. Most examples to try to put the inner constructor on one line of code, which, coming from Python and C, is hard for my head to grasp (or use foo and bar, which is as concrete an example as ether).
Very clearly explained, this was super valuable!
Carme i'm I can't read that font!! Please enlargthe font size so that it can be read from a tablet and for people Tha uses glasses.
Thanks for the great video!
Please do another video in this series on structs with other containers as fields. I am used to using classes in C++ that have other class objects as members. I would like to see how you do this in Julia. So what happens if you incrementally build on a struct as you process data. You don't have all the data to do a full initialization but defaults will work as placeholders, then modify it as you go. This would mean creating new structs or using mutable structs What about accessing structs as fields: would it be a.b.c[1] sort of thing? I am somewhat disappointed with the Julia documentation on the details of structs and constructors.
Great video, I've been learning a lot from your tutorials.
Thank you for the support! 🤗
i cannot see what you typed, cant you please make things larger? thanks.
Is there a more "convenient" way to define constructors when you have a relatively long list of variables in your struct?
how to put array in a struct?
So contains can be defined in a similar fashion. s.t.
struct Check
a::Vector{Float64}
end
var = Check([1.2, 3.4])
println(var.a)
Depending on what kind of container you want, you would redefine the element in your fashion. (:
@@DJsOfficeHours Thanks