Solemarc

joined 1 year ago
[–] [email protected] 4 points 2 days ago (1 children)

You're not wrong but I think when you're teaching someone just having 1 parent and 1 child class makes for a bad example I generally prefer to use something with a lot of different children.

My go-to is exporters. We have the exporter interface, the generic exporter, the accounting exporter and the payroll exporter, to explain it.

At school, the only time I used inheritance was 1 parent (booking) and 1 child (luxury) this is a terrible example imo.

[–] [email protected] 8 points 2 days ago (5 children)

Same, I always remember this with interfaces and inheritance, shoehorned in BS where I'm only using 1 class anyway and talking to 1 other class what's the point of this?

After I graduated as a personal project i made a wiki for a game and I was reusing a lot of code, "huh a parent class would be nice here".

In my first Job, I don't know who's going to use this thing I'm building but these are the rules: proceeds to implement an interface.

When I have to teach these concepts to juniors now, this is how I teach them: inheritance to avoid code duplication, interfaces to tell other people what they need to implement in order to use your stuff.

I wonder why I wasn't taught it that way. I remember looking at my projects that used this stuff thinking it was just messy rubbish. More importantly, I graduated not understanding this stuff...

[–] [email protected] 0 points 4 days ago (2 children)

It's not as if nothing is being done on GitHub we have both: rust-lang/spec which is being folded into rust-lang/reference.

I'm not sure why we don't have an official spec, I assume that reference was originally for rustc in particular and might include some internal weirdness instead of being a proper spec. Kinda like how gcc has some internal magic that isn't strictly to C spec.

I guess what happened was: spec for rustc -> developed rustc -> ferrocene developed from rustc spec -> "we don't have a generic rust language spec"

[–] [email protected] 86 points 6 days ago

I don't get why we're taking a swing at Linus here. The article only mentions him in relation to the rust for Linux project being slow going. But, it IS going and the US government has only stated that "you need a plan to move to a memory safe language by 2025 or you might be liable if something bad happens as a result of the classics (use after free/double free/buffer overflow/etc.)" but I don't think Linux would count it's free software and it does have a plan.

[–] [email protected] 10 points 1 week ago (2 children)

Well, I'm not American.

In Australia you either bring your own lunch or you bring cash for the school shop. If you have no lunch then the school feeds you from the shop and charges the parents later.

[–] [email protected] 64 points 1 week ago (10 children)

Hang on, does this say "schools charge transaction fees when you pay for lunch online"??? As in, a parent puts $20 on their child's tab for lunch and the school taxes it so the kid only gets $18? That's wild.

[–] [email protected] 5 points 2 weeks ago

I could swear it was higher earlier this year/last year but looking at the survey results, Linux climbed to 2% this survey. I think maybe that half remembered headline was something like "Linux is higher than MacOS at 1.5% market share" or something like that instead?

[–] [email protected] 92 points 3 weeks ago (2 children)

"You can turn it off", "it's an optional feature", they didn't even last a year! What ever happened to slowly boiling the frog?

[–] [email protected] 0 points 3 weeks ago (1 children)

I can't be bothered to build them but looking at the releases on GitHub openssl 3.4.0 is 17.5mb and rustls is 2.6mb. both of these releases are source files not binaries but I don't see how rustls could possibly be larger than openssl.

[–] [email protected] 0 points 1 month ago

Just looked it up, looks like you're right. The Go GC has to pause when it sweeps and it looks like the JVM has multiple GC implementations but all of them have to pause for sweeps. I don't really use either language so I didn't know how the magic worked.

[–] [email protected] 9 points 1 month ago

Ahh! Of course! The problem with Concord was the price! That's why no one cared during its free beta weekend!

[–] [email protected] 0 points 1 month ago (2 children)

Huh, I knew Go's GC ran on another thread but not the JVM, cool.

view more: next ›