Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> A language with semantic relations

This is a cool idea especially around a formal structure to express relationships between parts of your code. As to the example in the article on this, it seems property based testing is a decent way to achieve something like this with existing languages.

A simple example of a property based test for a `const add = (a, b) => a + b` function would be that the result of the invocation is always larger than the arguments IE

  expect(add(a, b)).toBeGreaterThan(a);
  expect(add(a, b)).toBeGreaterThan(b);
And then you can randomly generate or fuzz the values for a and b but the test should always pass


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: