3 ms·
It’s not going to work. You cannot capture the meaning of the change with metadata. Let’s say you have this change: BigDecimal doSomething(); to Money
by ivan_gammel 2y ago
It’s not going to work. You cannot capture the meaning of the change with metadata.
Let’s say you have this change:
BigDecimal doSomething();
to
Money doSomething();
In theory metadata can capture the migration from a plain number to Money#amount() and compiler will generate a facade for the client code. But simply discarding the currency will have disastrous effects at some later point. Even relatively simple migration String->Number may go wrong without semantics. Language feature allowing such metadata and migrations will be a minefield.
- TimTheTinker 2y agoSure, there are lots of examples of lossy migrations, even in databases. That doesn't mean migrations in general aren't a good idea. And it doesn't invalidate the notion of metadata for code in general and all the possibilities that opens up.
- ivan_gammel 2y agoWhen I was writing about shallow analysis, I was meaning that we need to see those possibilities beyond trivial cases. It sounds cool on the surface, but the devil is in details. There are lots of examples I can come up with in few minutes of thinking that show how this idea may not work. I would really like to see how this may work in a way where it will do more good than harm.