I would like to use structs to bundle values in a way similar to pure OOP.
So I would create a struct to encapsulate the relevant attributes.
Down below is an example:
struct Lion maneColor::String roar::String weight::Int # Do some work and then realize I need this attribute end alion = Lion("yellow", "rar") # Redefine the line after realizing I need the weight attribute in the struct alion = Lion("yellow", "rar", 10)
The REPL doesn’t let me redefine the struct as it throws an error:
ERROR: LoadError: invalid redefinition of constant Lion
I already had a look at the Revise.jl package (https://timholy.github.io/Revise.jl/stable/#Other-Revise-workflows-1) but didn’t get it to work ( it installed alright without an error, but it doesn’t let me revise my code automatically either).
My question ultimately is how/what to use Julia/Atom/REPL in order to redefine certain functions/structs without having to restart the Julia client all over again.
Thanks in advance!