bitcrafter

joined 1 year ago
[–] bitcrafter 2 points 1 month ago (2 children)

The reason why there are so many operators is because there is a scheme with three parts:

  1. << to return the old value, < to return the new value, neither to not return any intermediate value
  2. The operator to apply, e.g. +.
  3. = to "mutate" inside a MonadState, ~ to do a pure computation

This is how you end up with so many operators. I get that this is not necessarily explained that well, though.

Also, as elegant as this style of lenses is, I agree that the types are a bit weird, which makes then a bit tricky to lean and also can result in unhelpful error messages, so your point is well taken there.

[–] bitcrafter 1 points 1 month ago

Sure, but the comment to which I replied made the specific claim that, if Rust had used Python-style layout, then there would have been no serious adoption, and that is what I was responding to.

[–] bitcrafter 2 points 1 month ago

It is a joke. Nobody serious actually expects you to know what this term means.

Lenses, by contrast, solve a practical problem that comes up in languages where everything is immutable when you really want to change something deeply nested in your data structure, so they are not nearly as obscure.

[–] bitcrafter 1 points 1 month ago (1 children)

The context is that this entire post is essentially making fun of another post; follow the link to the original post on lemmy.world to see what I mean.

[–] bitcrafter 2 points 1 month ago

That's a fair point. I have learned so many programming languages and continue to enjoy learning about weird ones that these relatively minor syntax design decisions do not seem like they should be dealbreakers to me, but that likewise means that I am also not the one that they have to worry about appeasing when designing the syntax to attempt to maximize adoption.

[–] bitcrafter 8 points 1 month ago (3 children)

Hi everyone, I really am glad to see that we have decided to create a whole thread to pick on that self-admitted Lemmy noob for asking a question--what a loser!!!

[–] bitcrafter 2 points 1 month ago* (last edited 1 month ago) (5 children)
  1. Fear of unfamiliar syntax. This is utterly bogus, but I can bet you that if rust used python style layout and haskell style type signatures, it would still be incredibly niche. Something can wipe the floor with the competition, be rock solid, stable and blazingly fast, but if it’s unfamiliar it will be niche. See elm for front end, for example.

But the weird thing to me is that Rust's syntax is also pretty ~~familiar~~ unfamiliar since it is (just to start) heavily inspired by ML. Does it really just come down to the fact that it has mandatory curly braces and semicolons? It just seems weird to me that this should be the sticking point for people.

Edit: Oops, wrote "familiar" when I meant "unfamiliar".

[–] bitcrafter 1 points 1 month ago (4 children)

A lot of these operators are things like += and -=, though, which should not be too hard to remember if you are familiar with C-flavored languages.

[–] bitcrafter 2 points 1 month ago

Yeah, I had been willing to give the author the benefit of the doubt that this was all part of a big joke, until I saw that the rest of their blog postings are also just like this one.

[–] bitcrafter 2 points 1 month ago

What happens if you use an out of range array subscript a[n]? Does that always return an option type?

I think that you would be surprised by the amount you would learn if you spent five minutes actually trying to answer your own questions, instead of treating them as proof that you just made a relevant point merely by asking them.

[–] bitcrafter 8 points 1 month ago (6 children)

I am really confused by what is going on here. Was Neo4j the original author of the code? Because if so, then they can license their own code however they like. The potential sticking point would be if they represented the license as being AGPL3 when it is not because this would be fundamentally misleading, and it sounds like the court agrees that this is a valid concern because it awarded a partial summary judgement that, "The court did affirm that a license created by combining the AGPL with other non-open-source terms cannot be called 'free and open source.'"

It is noteworthy that apparently the Free Software Foundation did not think that this legal case was worth intervening in.

[–] bitcrafter 6 points 1 month ago

My humanity.

view more: ‹ prev next ›