FYI, this post is just my opinion on V12 architecture. No code or solutions.
David, thanks. I appreciate the feed back and suggestions. I agree, as I said to an earlier post of yours, that such re-write rules are possible, and it appears now, the ONLY FIX.
The thing that makes me weep is when one considers how much more coding baggage it takes to produce coherent results in V12, than in V4. What you are proposing is pages of extra code, that obfuscates the simple, vector calculus defining a basic exercise in Newtonian Mechanics, that at a glance, by anyone with calculus/physics in their background, not only explains the "physics problem" in one "cell's worth" of V4 code, but also it's complete solution.
Coding in V4 was like mathematical poetry.
Short, sweet, moving, to the point.....
V12?
Not so much ;-)
My contention now is that V12 seems to enforce this unit based "type-checking" too rigorously or too early.
In fact, your code above perfectly defines the approach I am suggesting be hard-coded into kernel implementation of Solve, Plus, Integrate, etc...
That is, as a basic default behavior of Solve/NSolve/Integrate/Plus, etc... in V12 should be implemented in such a way as to "keep the units" correct!
Solve/NSolve, etc... should, by default I believe, ALWAYS return correct magnitudes and correct units, whether such units explicitly defined (via Quantity), or implicitly defined in a unit-less fashion by the central mathematical relationships in the equations being solved. That is my contention (not one widely shared apparently) and I am sticking to it ;-)
Just think of the power this would give to a college student, for example, who is trying to deal with a problem in Newtonian Mechanics, and not a problem about programming language syntax errors.
Just imagine, like the great V4 days, if a student could basically type in, easily, in very few keystrokes, the exact mathematical language shown in his/her textbook on physics or calculus
and evaluate it. The first time I realized this was the V4 default behavior, I fell out of my chair.
I thought such Mathematica behavior was beyond cool!
Like them, I use Mathematica as the world's great "note taking sytem". With it, one can study, explore and take notes so detailed, and perfectly typeset, that the answers just fall off the digital notebook page. To me, Mathematica is a microscope, a telescope, a tool that makes the invisible, visible!
Like them, I am looking for a tool, like V4 surely was, that I can use to explore subjects like Calculus, Physics, Linear Algebra, Logistic Equations, Combinatorics, etc....
But sadly, I have 100s of 1000's of lines of code, that I wrote in V4, exploring the disciplines above, that would never, ever evaluate correctly in V12. For me, that lack of backward compatibility, is a huge personal loss. Years of hard work, now "read only". I selected V4 initially for such adventures in the 1990's because I was confident my efforts, like some old piece of Cobol, would execute everywhere, anywhere and at anytime in the future. Apparently not.
That said, all complaining aside, there is no real competition for the Mathematica and the Wolfram Language.
Mathematica is a superb engineering feat. For my money, no Jupyter fronted whatever, could ever hold a candle to Mathematica. Some of the stuff that has been added post V4 are astounding, like DynamicModules. Wow!
But, my work in V4 was just a retired engineer's "fly fishing adventure", minus the Zika and the Dengue. I enjoy Mathematica the same way I enjoy skimming the tree tops in Cessna 182 on floats, and popping down onto clear Maine lakes or the way I use my '57 ES-175 when transcribing Joe Pass chord-solos... for the sheer, unrivaled buzz of it!
The first time I saw Mathematica was in the late 1980's, at General Dynamics, where I helped program the four parallel, flight control computers of the F16 A/B in Jovial. Mathematica V1
and it was running an original Apple Lisa, if memory serves. I was dazzled then. I still am!
I will always keep a licensed copy of Mathematica on my machine, as I have done for three decades. I am a dye-hard fan!
I just won't be able to "fly it" like I could in V4 apparently.
It is now a different vehicle ;-)
Thanks for everyone's help.
The last example, has no simple syntactical solution that produces both correct magnitudes and correct units for the output of Solve, at least none I have found after weeks of searching. There are some great YOUTUBE vids by Wolfram guys talking about the features of Quantity, but the bulk of those are about simple unit conversions and large currated libraries of mathematical constants, etc...
I have yet to find a single YOUTUBE or webpage, anywhere, where this sort of basic physics problem, is handled in the most compact vector calculus, and where Solve/NSolve return all explicit and implicit defined units for all variables.
Regards,
- Joe