bog icon indicating copy to clipboard operation
bog copied to clipboard

Feature request: user-defined number type

Open data-man opened this issue 5 years ago • 3 comments

E.g.:

pub fn Vm(comptime intType: type, comptime floatType: type) {
 ...
}

var vm = bog.Vm(u128, f128).init(allocator, .{ .import_files = true });

or

pub fn Vm(comptime intBits: u8, comptime floatBits: u8) {
 ...
}

data-man avatar May 31 '20 19:05 data-man

I don't think this is useful enough to justify making Vm generic, but it could be provided as a build option.

Vexu avatar Jun 01 '20 11:06 Vexu

it could be provided as a build option.

:+1:

Are you interested in extending the standard library? E.g. std.* or std.math.*.

Or should I open a separate issue for that?

data-man avatar Jun 01 '20 16:06 data-man

Are you interested in extending the standard library?

Sure, I haven't got around to do much with the std since other parts like the gc are still quite broken.

should I open a separate issue for that?

Not necessary, but feel free to do so.

Vexu avatar Jun 02 '20 08:06 Vexu