Login

Off-topic AI Gripes

Auditability degradation

Consider this vlang patch

	f_u8(256)
	f_i8(128)
	f_i8(-129)
	f_u16(65536)
	f_i16(32768)
	f_i16(-32769)
	f_u32(4294967296)
	f_i32(2147483648)
	f_i32(-2147483649)
	f_i64(9223372036854775808)
	f_i64(-9223372036854775809)
	f_isize(9223372036854775808)
	f_isize(-9223372036854775809)

These values are all constructed to exceed the range of the type. This could be effortlessly audited for correctness by a human at a glance if it'd used hexadecimal literals with _ separators, which the language supports. But what AI generates, people stop expecting a human to have to read, and so the code becomes pointlessly cryptic.

Of course, anyone who could read the hexadecimal can likely recognize the first few numerals, but it's still a higher-effort read, and how many people can recognize the decimal value of 0x8000_0000_0000_0000L at a glance, or distinguish it from Int64.max_int?