Nick Smith
Nick Smith
Just a note: in Python, and in today's Mojo, `Foo.__init__` is invoked as `Foo.__init__(my_foo)`. It *isn't* invoked as `my_foo = Foo.__init__()`. I don't personally care whether we diverge from Python...
It might make sense to just use the dunder method name as the trait name. So there could be an `__int__` trait and a `__len__` trait etc.
I'm not sure why you're talking about renaming `Formattable` to a lowercase name. All I'm suggesting is that it might be worth using special names for the traits that correspond...
I just experienced the same issue as OP. As Eric described, the errors just suddenly disappeared after a long delay (minutes?). Unfortunately I don't know if I actually opened `builtins.pyi`...
The bigger issue is that Mojo doesn’t actually have an assignment operator. It has function calls, and = signals where the result of a function call will be stored. When...
Also, if we're renaming the word "size", it might also make sense to rename the Sized trait (that includes the `__len__` method) to something different. Notably, in Rust, the Sized...
That said, given Mojo already invented the adjectives Intable and Stringable, maybe Lengthable would be fine. 🤷♀️
For discussing the `Sized` trait, I opened #3514.
@lattner > FYI `y = Int.__copyinit__(x)` is the same as `y = x.__copyinit__()` I don't think this is the case. Try running this program on nightly: ```mojo struct Foo: var...
@lattner I'm surprised to hear that this is your preferred given your [proposed](https://forum.modular.com/t/deinit-proposal/2095/87?u=nick) `@destructor` syntax. With that syntax, it would make more sense to flip the arguments of `__moveinit__` (and...