Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by bossyTeacher

5 days ago

I was thinking of something like this:

type MyType{ myName: string where size > 8, year: number where number > 2000 }

Then, whenever this type is used, at compile time, an evaluation is done to ensure that the type restrictions are enforced.

0 comments

bossyTeacher

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities