logoalt Hacker News

Spectre Programming Language

29 pointsby asdkopyesterday at 11:14 PM3 commentsview on HN

Comments

slowcachetoday at 1:11 AM

I'm not really sure what niche this fills.

To me, the main draw looks to be the invariants that you can supply within functions, but this isn't a new concept outside of it being a dedicated keyword. Otherwise this looks like rust without all of the functionality

show 1 reply
yesbuttoday at 2:03 AM

> You will notice the trust keyword here. Any operation (such as IO) that has an underlying unsafe mechanism (such as the @print builtin that std.stdio.print uses), must be explicitly trusted, as it is inherently impure.

just document the impure operations and stop forcing the programmer to type extra characters.