Skip to content

Conversation

sbillig
Copy link
Collaborator

@sbillig sbillig commented Sep 3, 2025

Notes:

  • Unary plus is currently hardcoded as a no-op. I think we should remove parser support for it. I dunno what it would do. (rust doesn't support it, fwiw)
  • The index op on arrays can't be implemented in fe yet; impl<T, const N: usize> Index<usize> for [T; N] fails on the use of N in [T; N] (we only int literals in that position right now) (issue add support for using const ty param as array size #1120)
  • Unlike rust, we currently have a BitNot trait in addition to Not. We could merge them.

eg

use core::ops::Add
impl Add<i32> for Point {
  fn add(self, _ n: i32) -> Point {
    Point { x: self.x + n, y: self.y + n }
  }
}

fn f(p: Point) -> Point {
  p + 100
}

@sbillig sbillig merged commit cf5c5e6 into argotorg:master Sep 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants