13 karma · joined October 12, 2015
Couldn't the code highlighting be also handled statically during the build process?
Maybe there is a future where flutter style renderers become standard, have a container like a browser (to avoid the entire runtime baggage when it's deployed), and people target it instead of the DOM? This gives best of both worlds--write apps in a declarative way, without the need of any external "optimizing" framework.
What is real?
It didn't occur to me that: ownership transfer means variable cannot be used, so if it's used means there's an error, so checking for error itself gives you the information that you cannot use it. So highlighting error can be used instead of the specific ownership transfer.
I don't know of any other specific cases where there's no error, but it would be helpful to have a different color for certain ownership semantics.
e.g. in
let new_owner = original_owner;
println!("{}", original_owner);
we could have original_owner on the second line have a different color signifying it doesn't own anything.Or, does such a syntax highlighter already exist?