anton

joined 2 years ago
[–] anton@lemmy.blahaj.zone 1 points 2 hours ago

Don't believe them, there is more great and some frustrating stuff afterwards.

[–] anton@lemmy.blahaj.zone 7 points 1 day ago

How dare @Feyd@programming.dev not reveal the address of the programmer instance.

[–] anton@lemmy.blahaj.zone 1 points 2 days ago

Doesn't like puritan cultural influence, left.

[–] anton@lemmy.blahaj.zone 5 points 4 days ago

* Swedish developer of the year

Don't get me wrong, he does great work, but your post should mention it somewhere.

[–] anton@lemmy.blahaj.zone 6 points 4 days ago (3 children)

Rust doesn't allow type inference in function signatures, c++ does with auto. IIRC, they recommended against using it, because of -you guessed it- compile time.

[–] anton@lemmy.blahaj.zone 4 points 4 days ago

I know, but otherwise there is no use for the knowledge that we live in a simulation. Unless someone can contact the outside of course.

[–] anton@lemmy.blahaj.zone 9 points 4 days ago* (last edited 4 days ago) (3 children)

The only thing one could do with knowledge of being in a simulation, is trying to find bugs and exploits.
From now on, I expect anyone claiming we live in a simulation to have a working perpetual motion device, faster that light communication, or something similarly impressive. If they don't, their claim is ~~meaningless~~ useless.

[–] anton@lemmy.blahaj.zone 1 points 1 week ago* (last edited 1 week ago)

But you’re also missing one use of the impl keyword: fn func() -> impl Trait.

[...] So dropping the impl in [return position] might not be completely impossible like the other uses of impl.

But the impl markes that it is a trait to the programmers.
Take the following functions:

func1()->A{...}
func2()->A{...}

Does the following snippet compile?

let mut thing = func1();
thing = func2();

Under the current rules we know it will. But if A could be a trait, the functions could return different types. We currently mark that with the impl.


Why? What value does -> () provide? Why not elide that?

What value is provided by keeping it?

What value does cluttering up your code with -> () provide?

Why a syntactic special-case for exactly that type and not any other random type?

Because the unit type is special, just like the never ! type. () also has the special importance of being the return value of an empty statement and some other stuff.


languages w/o [semicolons] feel awkward since you’re generally limited to one statement per line

Then fixing that might make sense. :-)

It's fixed with semicolons ;-)

[–] anton@lemmy.blahaj.zone 5 points 1 week ago

I'm sorry I don't know all the arcane incantations of your court system of the top of my head.

[–] anton@lemmy.blahaj.zone 1 points 1 week ago (1 children)

If the spec contains default values why not make a constructor with all the missing fields or implement Default when all fields are covered?

Also lol:

#[test]
fn test_config_load() {
    todo!();
}
[–] anton@lemmy.blahaj.zone 11 points 1 week ago

And considering the content of the "comics", one set up to glorify AGI as our lord and savior.

 

Photo taken from here

 
view more: next ›