[-] [email protected] 3 points 1 day ago

Time... travel?

[-] [email protected] 3 points 1 day ago

Uhh, yeah.

Maybe it's the 5G.

[-] [email protected] 6 points 1 day ago

Neat, I do have them. It's probably because most people have a lot of subtle freckles everywhere and any 3 dots forms a triangle or something.

[-] [email protected] 14 points 2 days ago

Capitalizing on a highly marketable hype bubble because the technology is specifically designed to deceive people into thinking it's more capable than it is

[-] [email protected] 1 points 3 days ago

What I described isn't necessarily functional. This is just a principle for ensuring objects represent clear and well-defined contracts. The idea is that to mutate something, you should own it; that means interfaces / public APIs, which can be called externally, should take immutable arguments. You can still mutate instance members internally because those are owned by the instance. If mutation is really necessary between two objects then it should be coordinated by an object owning them both.

[-] [email protected] 2 points 3 days ago* (last edited 3 days ago)

That's a footgun sure but at least you can avoid it once you're aware of the problem.

I never write function signatures with mutable interfaces. It's always IEnumerable, IReadOnlyCollection, or IReadOnlyList; otherwise, use a concrete type. The latter is typical for private/protected methods that are called with instance members of a concrete type rather than public interfaces. If you want to mutate an object, you should own it. Public methods are invoked with data not owned by the instance.

For example, a lot of extension methods in LINQ have a signature IEnumerable --> IEnumerable, and internally the first thing they do is call .ToList(). The interface makes minimal assumptions about the input data, then puts it into a concrete type you can manipulate efficiently. You can similarly define a method for IReadOnlyList and explicitly make it mutable via .ToList(), rather than use IList and check .IsReadOnly. Both ensure correctness but the former does it at the type level, at design time, instead of relying on runtime checks.

C# is old and full of oldness. But it's also an excellent language that can be written beautifully if you know how. And there's lots of great code to learn from in the open-source dotnet core runtime repo and related projects.

[-] [email protected] 7 points 4 days ago

The hot dog says "served with fried potatoes" at least. If the burger doesn't come with fries that's criminal. How can you serve a burger without fries

[-] [email protected] 9 points 4 days ago
[-] [email protected] 54 points 4 days ago* (last edited 4 days ago)

Ridiculous prices? This is pretty much normal in my area, which isn't one of the most expensive places in the country. Boring ass menu though

[-] [email protected] 13 points 5 days ago

What instrument doesn't sound like total shit in beginner's hands? A keyboard?

[-] [email protected] 116 points 1 year ago

Monkey laundering.

[-] [email protected] 84 points 2 years ago

That's for the kernel. Userspace often breaks userspace.

view more: next ›

kogasa

0 post score
0 comment score
joined 2 years ago