#Why the rename
1 messages · Page 1 of 1 (latest)
it used to be the case that casting builtins would take as a first parameter the destination type, and the second parameter would be the source value
now, builtins only take the source value, and infer the desitination type based on the result location
const old_syntax = @intToFloat(f32, value);
const new_syntax: f32 = @floatFromInt(value);
the rename part is mostly because of this semantic change
well the names got changed before the RLS stuff
yes, but the rename is explicitly because of the RLS stuff
oh i didnt realize that
thought it was just because it was kinda more clear, everything that returns an int starts with int, results goes to the thing on the left so the result name is on the left etc
it reads better, because now it's not "int to float, f32, value". Instead it's "f32 float from int, value"