When dividing ints in Vyper it should give a decimal.
When dividing a uint256 using uint256_div(x, y) it produces a uint256 instead of a decimal.
I think this should be changed as it is not the expected behaviour.

Agreed.
See #716 also.
Types co-mingling is the root of all chaos. Also, on Ethereum, you usually only ever use integers. Ever. Having decimal as an option is cool, but it's a 1% vs 99% thing.
I think dividing ints should give an int. For decimal division, divide decimals.
In fact, Vyper should have absolutely no implicit conversions at all (especially not between signed and unsigned ints!) Operations should be allowed between variables of the exact same type, and the result should be the same type as the operands.
decimal / decimal = decimal (decimal division)
integer / integer = integer (integer division)
decimal / integer = COMPILE TIME ERROR
integer / decimal = COMPILE TIME ERROR
@daniel-jozsef the main reason we currently do integer / integer = decimal derision is make the rounding specific by using ceil and floor, making it clear what rounding is being used.
Integer division is grade school stuff. It's NOT ROUNDING. How many times can you fit two in five? Two times, with a _remainder_ of one.
I think it's a horrible antipattern to mix types like this. If we prioritize readability, this is not intuitive at all. Anyone with any experience in programming will expect an operation on two variables of the same type have the exact same type as the two inputs.
(Also, using anything other than integers on the blockchain makes me cringe.)
If someone wants decimal division between two integers, they should cast them both to decimal.
@daniel-jozsef @yzhang90 @fubuloubu
I agree with your suggestion/assesment and I think we should try and wrap the whole division issue into one clean VIP. I was just giving some background on the the thought process at the time.
These are all the related issues I could track:
https://github.com/ethereum/vyper/issues/717 (this one)
https://github.com/ethereum/vyper/issues/737 (VIP: Disallow implicit conversion)
https://github.com/ethereum/vyper/issues/716 (Need support for integer division in Vyper)
https://github.com/ethereum/casper/issues/67
@jacqueswww on board!
I am closing this as a decision has already been made on #737 and #716.
Most helpful comment
@daniel-jozsef @yzhang90 @fubuloubu
I agree with your suggestion/assesment and I think we should try and wrap the whole division issue into one clean VIP. I was just giving some background on the the thought process at the time.
These are all the related issues I could track:
https://github.com/ethereum/vyper/issues/717 (this one)
https://github.com/ethereum/vyper/issues/737 (VIP: Disallow implicit conversion)
https://github.com/ethereum/vyper/issues/716 (Need support for integer division in Vyper)
https://github.com/ethereum/casper/issues/67