So, crazy idea time (I am not sure whether this is a good idea):
It is somewhat painful to deal with non-machine-sized values. For example an increment of an Int16 reads as
x += Int16(1). I always thought that this was unavoidable; but we now have
x^(-4) which are lowered differently than
The crazy idea would be to lower
+(x, convert(typeof(x), 4)). Advantage: shorter code. I can write
x+=1 for increments and have it do the right thing. Most of the time, if I add a literal to something, I do not want to promote. Same with multiplication. Same holds for Float32.
Disadvantage: The same as with the literal pow, this needs people to be very careful with associativity and parentheses and might be too error-prone:
4^(-1) #0.25 4^(-2+1) #DomainError with -1: #Cannot raise an integer x to a negative power -1. #hypothetical: x::Int16 x += 2 #still Int16 x = x+1 -1 #still Int16, + is left-associative x = x + (1-1) #now Int64
In total I think this is a bad idea (simple predictability of rules before conciseness or convenience), but the new negative integer literal powers already break this anyway; and then, such a change would be awfully convenient.