sb
sb
MModular
Created by name on 11/19/2024 in #questions
An alternative model for lifetimes in Mojo
Hello! There's a bit of an ongoing discussion over in this thread: https://discord.com/channels/1087530497313357884/1300731761356967997
3 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
And they aren't rewriting those parts in C?? 😵‍💫
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
I've honestly seen a good chunk of python devs be rather dismayed by being forced to consider it--systems dev folks who want that level of control are a surprisingly rare breed 🤓
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
I personally don't like it being a magic char in the first place, but yeah--I personally might have swapped the two if it were my call
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
Rust already steals a lot of that crowd, Haskell another chunk
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
Python users (most programmers, honestly) are not often open to significant disruptions to their intended approach
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
I think the situation will improve once explicit copy is better supported
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
That's what I've taken to doing--completely nuking implicit copy constructors and combing through the rubble left behind
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
I agree, and am not a fan of the relatively loose copy semantics but it is at least possible to learn your way around (and is a hill I have already died on to little effect)
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
I have my opinions but it's ultimately one of the various concessions for pythonicity
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
:)
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
Oh, right, you don't need it on the second one because it is an rval
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
It shouldn't mark it as redundant
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
The first one is already basically an lval, the second one is an rval because you construct the socket in the expr
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
return socket^
39 replies
MModular
Created by aurelian on 10/19/2024 in #questions
why is this return a copy?
You can use the return keyword with the ^ move sigil
39 replies
MModular
Created by Carbon on 10/5/2024 in #questions
Value Semantics and async code
Function color is still present here, and an effects system is not on the roadmap, so you'll likely have to deal with some of the same friction points on that you'd remember from rust
6 replies
MModular
Created by DayDayUp on 10/2/2024 in #questions
How to improve the performance of formatting output
does mojo have string interpolation yet?
22 replies
MModular
Created by banananas on 10/1/2024 in #questions
Using structs that inherit from a specific trait as a type?
yeah, sorry, I know that feature is pretty significant hole at the moment
15 replies
MModular
Created by banananas on 10/1/2024 in #questions
Using structs that inherit from a specific trait as a type?
(getting that to work pretty much requires either vtables or some global transformation on top of sum types, neither of which Mojo has yet)
15 replies