Hacker Newsnew | past | comments | ask | show | jobs | submit | duped's commentslogin

I have always heard "prefer composition to inheritance" also referred to as "has a" instead of "is a." Meaning:

    class Dog : Animal; // inheritance 
    class Car: 
        Wheels wheels; // composition

Yep. "Composition" has many meanings, but in the context of "inheritance vs. composition" it's just referring to "x has a y".

> I struggle to understand why the (potential?) rights-holders are so intransigent about this.

> you will get a fixed percentage of every sale"--that seems like an easy win-win, does it not?

It's really not an easy win-win. Entertainment falls into the attention economy, so if you're giving rights to some low-value IP away for pennies but it winds up getting popular, that's lost revenue elsewhere that might be more valuable.

On top of that these media corporations are borderline militant with defending their vaults of IP because it's the only way to distinguish themselves in a crowded landscape. Exclusivity is essentially the only way they can compete, and giving away rights for peanuts is not in their interest.

These companies default to saying "no" and when you add in the complexity of finding documents that may not exist, it's not hard to see why it'll never happen.


The traditional thing would be to have an init() function that is required to be called at the top of main() or before any other methods that need it. But I agree with your point.

Now lets say its an async cache instead of singleton.

I think Rust is easier to learn than C++

I agree with you as long as you don't know C++ first. I actually teach C++ and Rust to students who only know Java, and they have a much easier time picking up Rust. It's the people who approach Rust with C++ idioms who have the wort time with it. It comes down to the tooling, especially Cargo being the one-stop-shop for everything Rust. Another poster here laments that Cargo is too overloaded with disjoint functionality, but that's actually a benefit for a lot of learners.

I think tooling is big and people underestimate the lingering cognitive overhead of simply building C++ with arcane CMake files, but honestly it's more that much of Rust is informed by problems in C++ that they didn't have to inherit and don't have to maintain forever.

Like for example, how many ways are there to initialize a variable in C++? Which are you supposed to use?


C++ is the hardest, most difficult programming language to write correct (according to spec, not in the ‘it compiles’ sense) programs in ever created that isn’t a toy or specifically designed to be hard like malbolge. It takes a decade of writing it daily to realize that you know nothing, precisely because the compiler does not reject so many invalid programs.

A media business is predicated on exclusive rights over their media. The entire notion of media being freely copied and saved is contrary to their business models. I think there's a healthy debate to be had over whether those models are entitled to exist and how much harm to consumers is tolerable, but it's not really obvious how to create a business that deals in media without some kind of protection over the copying and distribution of that media.

I think what breaks computer peoples' brains a bit is the idea that the bytes flying around networks aren't just bytes, they represent information that society has granted individuals or businesses the right to control and the fact technology doesn't treat any bytes special is a problem when society wants to regulate the rights over that information.

I have worked on computer systems for media organizations and they have a very different view of intellectual property than the average programmer or technologist. The people I find the most militant about protecting their rights are the small guys, because they can't afford to sue a pediatrician for an Elsa mural or something.


If the light never turned green you'd bet your butt that plenty of people would run the light.

Sure, then don't complain if you get into a crash and your insurance finds you at fault. Actions have consequences.

So, if a traffic light never changed from red to green, you would advise..? Or do you just mean “in that situation, be very careful not to crash”?

Call the cops and have them organize traffic, they have a literal traffic department.

This is the problem with leaky analogies. The US immigration system is more like a train tunnel in a Wile-E Coyote cartoon that Roadrunner can run through but Wile-E slams into.

Paramilitaries kidnapping and assaulting my neighbors is not "rage bait." It's fascism.

Flock is a bad actor and untrustworthy (misleading departments and officials about how data is shared/accessed, literally reinstalling cameras that cities have demanded to be taken down). Regardless of whether the local municipality wants surveillance or not, Flock is not a trustworthy company to buy it from.

> Regardless of whether the local municipality wants surveillance or not, Flock is not a trustworthy company to buy it from.

That's because the local authorities aren't the final customer. The final customer is the federal government, they want allllll the data.


And Garrett, the founder, has what even he calls a quite literal, not aspirational/visionary/metaphorical, aim that "We want to eliminate all crime."

Dear God I hate this particular breed of techbros. These people don't give a damn about democracy, about human rights or anything else other than their stab at entering the history books in a "positive" light...

The tech bros however get to have drugs, prostitutes and unethical medical experimentations!

> misleading departments and officials about how data is shared/accessed

Many times this isn't misleading, per se, but nudge nudge wink wink. "We trust you to follow your own data privacy policy. It's not our job to police how access to your data is configured." In Washington, for example, there is data that LE cannot collect, and LE cannot pay someone to collect directly for them to bypass that...

... but if someone just so happens to ALREADY be collecting it, they can pay to access it.


Not all machines deserve to exist

std::arch::* intrinsics for SIMD are stable and you can use them today. The situation is only slightly worse than C/C++ because the rust compilers cares a lot about undefined behavior, so there's some safe-but-technically-unsafe/annoying cfg stuff to make sure the intrinsics are actually emitted as you intend.

There is nothing blocking high quality SIMD libraries on stable in Rust today. The bar for inclusion in std is just much higher than the rest of the ecosystem.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: