Live data from Hacker News

My least favorite Rust type

ridiculousfish.com

121–130 of 298 posts

Re: My least favorite Rust type

#121

I can’t even figure out how to iterate over a Range of Vectors? iter and collect both don’t exist... Google doesn’t seem helpful either. I don’t know any rust but it seems unforgiving at the first hurdle here :-)

There are plenty of hurdles in Rust, but I wouldn't call this one of them. What exactly do you expect an Iterator for a range of vectors to do?

Re: My least favorite Rust type

#122

Earlier quoted context omitted.

I do ignore him. I was only pointing out that I don't take him seriously, in response to referencing him.

For someone who ignores him you’re spending a lot of time (27 comments on this post) griping about him.

I'm bored. It's a release day and my QA team is really competent, so I don't have much to do.

Re: My least favorite Rust type

#123
post #73

Earlier quoted context omitted.

Yes, but now you've shifted the goalposts, because I think most people would generally consider PL researchers to have an understanding of programming language design.

Well, that's fine, then. Many of them do eventually create something useful later. Johnathan Blow is a game designer, though.

You can be more than one single thing. Johnathan Blow is a game designer, a game programmer, an entrepreneur, a programming language designer, etc.

At the end of the day he's someone who do write software for a living since decades, and has strong opinions and expectations. And he's using this to create the tools he wants to have.

Re: My least favorite Rust type

#124

Earlier quoted context omitted.

If you're counting the language by "how many pages of specification" it takes up, perhaps. To me is the language is really like the many features it had when it came out, and then the standard library improvements since then have been "string routines" and then "more string routines" and then "atomics, and also some string routines". Now C++, that's a language that has changed a huge deal–your C++03 code is obviously…

It sounds like you actually haven't been using C for very long, if that's what you think standard library changes amounted to. By your definition, it hasn't changed too much since the release of B in 1969.

I've used C for long enough to meaningfully contribute to this conversation. And yes, by my definition C takes much of its inspiration from B, although there are enough differences that I would not claim that B is some sort of release of C.

Re: My least favorite Rust type

#125

Earlier quoted context omitted.

I don't think it's reasonable to make a comment like this without explaining why. He has designed a programming language, so it seems fair to assume he'd have an understanding of programming language design.

You got a link for the compiler for said programming language?

Are you implying that it doesn't exist? It clearly does.

Re: My least favorite Rust type

#126
post #6

I feel like this is an example of what Jonathan Blow calls a "Big Idea" or a "100% solution". His thesis is that when you make a feature of a language too abstract and usable in many different contexts, eventually there will be so many corner cases that the result will almost certainly be clunky and full of footguns. He claims that language designers should aim for "80% solutions" instead, which cover most common usa…

This is true, but a lot of users will clamor for a 30% solution as well. A user may be writing a back end in your language and ask for first class SQL. After all, they write a lot of SQL and being able to have typechecked, safe SQL statements sounds great, right? Except, not everybody writes SQL. Indeed, SQL may be dead in 10 years (I'm not making this claim, but it is a possibility) and replaced by a different language.

A good language designer will see that users want a general way to query over data, and create something like LINQ.

Of course, you're right that language designers shouldn't go for a 100% solution. Monads are kind of the classic 100% solution. You can do anything with monads, but that means you can do anything with monads.

Re: My least favorite Rust type

#127
post #113

Earlier quoted context omitted.

He has some really good fantasies. But all he has is words.

I know nothing about the discussion of whoever this dude is, but I am very impressed that HN hasn’t rate limited your comments with all the grey I’m seeing.

Right? It appears that the sweeping downvoters are out, too. It's only a matter of time, I suppose.

Re: My least favorite Rust type

#128

I can’t even figure out how to iterate over a Range of Vectors? iter and collect both don’t exist... Google doesn’t seem helpful either. I don’t know any rust but it seems unforgiving at the first hurdle here :-)

It looks like you can't. You can create a Range out of it, but the range is not an iterator. If you look at the Range docs[0], you'll see that it only implements Iterator where its generic type (A) implements std::iter::Step.

Going to the Step docs[1] you'll see that its only implemented by integer types and char. If Vec implemented Step, you could iterate over it.

Also, if you're referring to the "contains" guessing puzzle, you have to look at Range::contains docs to see it uses Vec's PartialOrd implementation (basically comparison), in which docs state its elements are compared lexicographically.

Usually in Rust the first thing I'll do when trying to do something very specific (iterate over a Range of Vecs) is try it at the playground (play.rust-lang.org) and/or just look at std docs.

[0] https://doc.rust-lang.org/std/ops/struct.Range.html#impl-Ite... [1] https://doc.rust-lang.org/std/iter/trait.Step.html#implement...

Re: My least favorite Rust type

#129
post #6

I feel like this is an example of what Jonathan Blow calls a "Big Idea" or a "100% solution". His thesis is that when you make a feature of a language too abstract and usable in many different contexts, eventually there will be so many corner cases that the result will almost certainly be clunky and full of footguns. He claims that language designers should aim for "80% solutions" instead, which cover most common usa…

This statement seems very true, even to the point of “duh” for people who have designed and maintained semi-widely used API or applications. I wonder where the language design wisdom to the contray come from.

Similar to the marketing/advertising axiom: 80% of all marketing spending is waste, but you you will only know after it has been spent.

Re: My least favorite Rust type

#130

Earlier quoted context omitted.

You got a link for the compiler for said programming language?

Are you implying that it doesn't exist? It clearly does.

If I can't download and try it, it might as well not exist. There's no way to meaningfully evaluate the language without being able to use it.
Post reply on HN