log verbosity levels are stupid
because when should you use any log level other than
error
,warn
, orinfo
?use severities instead of verbosities
and there is really no need for anything lower, because guess what:
debug
andtrace
andDisplay
andVerbose
andVeryVerbose
and what have you - they’re all just moreinfo
for you
tracing is better than logging
I also imagine visualizing traces live in your CLI could yield a very nice user experience, with a visible progress indicator as to what eg. your compiler is working on right now at a glance, reassuring you that it is not stuck on some
while (true) {}
in constant evaluation
don’t use
RefCell<T>
using
RefCell
has a few disadvantagessecond, your program can now panic in unexpected places, because it turns out runtime borrows can be really hard to predict
as evidenced by a random crash I once got while using druid which was caused by a overlapping mutable then immutable borrows at runtime
fourth, and this one is extremely easy to spot - your code becomes really verbose!
and you end up with lots of temporaries because of the
Ref<'b, T>
guards you have to keep in scope.