asoffer / Icarus

An experimental general-purpose programming language
Apache License 2.0
9 stars 2 forks source link

Improve the user-accessible abort mechanism #97

Closed perimosocordiae closed 2 years ago

perimosocordiae commented 2 years ago

This would be the runtime version of gh-66, similar to Rust's panic!() or the C++ std::abort().

perimosocordiae commented 2 years ago

Oh wait I forgot about the abort() built-in: https://github.com/asoffer/Icarus/blob/2e94748d1b5bd556244c95727b77d78971ccdfb0/stdlib/core.ic#L95

But I'll leave this open until we have something that accepts a string for the error message (maybe implemented in the Icarus stdlib)

asoffer commented 2 years ago

Print and then abort? This feels like LOG(FATAL) which is valuable but needs a lot of design work.