I think if GH2 development would have been a bit faster, we could already retire GH1. These bugs are known for more than 10 years, and personally I don’t see a benefit in solving it anymore. Currently there are similar topics active, but I think fixing an almost deprecated software is pointless. It would affect many components.
Just ensure not to work with empty strings or branches. This is bad in many ways anyways.
The result is obviously wrong, but you may conclude the wrong problem. You implicitly convert strings to int. It should be explicit only (by a conversion component), which should throw an exception when parsing empty strings.
In this regard I also think that the GH2 solution may create more problems if it allows null states. A null will almost always create a problem somewhere. There is always a piece of code which doesn’t check against null and fails because of this. It will just occur much later and cause lot of confusion.
Other than that, Null times 4 is not null nor is it 4. It should not doable because value types are not nullable. Without an exception I would expect 0 or NaN. So I also think GH2 does something wrong here. But these edgecases are debatable, and should be avoided therefore.
That’s the same ‘waiting for Godot’ (GH2) attitude that has resulted in ten+ years of suffering with “well known bugs”, despite three major revisions (R6, R7 and R8) that passed without fixing them. What makes you think that GH1 is “almost deprecated software” I see no evidence of that. At the rate R8 bugs are still being reported, reliable GH2 could easily be five or more years away.
From a technological standpoint, 10 years are a lot. There was little improvement over that time with the reasonable justification, that David is working on a successor, which solves all the conceptual problems of GH1.
Now I have no idea what has happened, that it took so long, but this is the situation. I think if GH2 is a failure, then it would be a bad choice to just stick to GH1 and fix all the problems. Instead we might need a new third software which stays closer to GH1.
I’m not a big fan of this minimal change mindset to keep software running forever. Your development will just stall if you bet on a (technically) dead horse. We currently see this with the transition of Net Framework 4.8 to Net Core 7+. Plugins will need to change anyway sooner or later or disappear. No software is forever and it is inevitable that GH1 like this becomes depreciated. Rather sooner than later. Btw, Grasshopper could indirectly even stall Rhino development.