Live data from Hacker News

My least favorite Rust type

ridiculousfish.com

41–50 of 298 posts

Re: My least favorite Rust type

#41
I broadly agree with this, and am most frequently confused by the fact that a `Range` isn't `Copy` even if `T: Copy`. I feel this was a small design mistake (having `Range` itself be an interator instead of implementing the `IntoIterator` trait) but there is a proposal to fix this that looks like it wouldn't be breaking, and so should be possible:

https://github.com/rust-lang/rfcs/issues/2848

Re: My least favorite Rust type

#42
post #7

Earlier quoted context omitted.

Just because it has been debated extensively doesn't mean it's not a wart. Having run into the "reverse range does not contain what you obviously expect it to contain" before and wasting a few hours on it, like many other people have and will continue to do in the future, definitely makes me want to call it a wart.

Rust tries to be conservative with its semantics. You can always create your own range type and implement a deref/from for it to convert it to Rust range.

I think the problem here is more that the semantics are documented in the "documentation", but are contrary to the intuition derived from the semantics in the type system.

`.contains()` is only implemented for `Range`, which to me implies that when checking whether a value is contained in the Range, it has enough knowledge about the ordering of numbers that it should be able to still do a bounds check on reversely ordered numbers.

Re: My least favorite Rust type

#43
post #39

Earlier quoted context omitted.

Because I can't download a compiler for his language and try out his ideas. I've designed fantasy programming languages, too, but you don't see me telling everyone on the internet that will listen to me about them, dragging other PL designers that have actually released working code through the mud as I do. It's a simple matter of put up or shut up.

He demonstrably has a working compiler and programming language. Calling it a "fantasy" just because he has not given you full access to the source is plain incorrect. He streams so much of his development work on the compiler that a determined party could probably reproduce it by just copying the text from his text editor. He streams so much of his game development using the compiler that it obviously and unambiguou…

I can make a python script that prints out stuff while I'm streaming, too. He hasn't demonstrated squat.

But, let's say he does have a working compiler. It's very probable that he does. Why doesn't he release it, then?

Well you see, the only way it's possible to really effectively criticize a programming language is to use it. By not releasing the compiler, he avoids real criticism.

So, no, I don't take him seriously on PL design. At best, he's scared of criticism, but wants to be able to criticize others. At worst, he's a fraud.

Re: My least favorite Rust type

#44
> Range requires the borrow, so the vastly more common Range etc.

So I have no idea about rust, but in c++ a big feature of templated code is that you can make type appropriate specializations, is that not possible in Rust or did its standard library maintainers just sleep on the job?

Re: My least favorite Rust type

#45

Earlier quoted context omitted.

So that's a no, then? You have seen the vaporware, but you do not yet know what it smells like?

Some people got access to the beta https://youtu.be/i1vbvikDiI8 Why do you think it's vaporware?

Because it hasn't been released, and it likely never will be. It's impossible to criticize a programming language without actually using it, so any discussion of its merits is moot without an actual release.

Re: My least favorite Rust type

#47

Earlier quoted context omitted.

Some people got access to the beta https://youtu.be/i1vbvikDiI8 Why do you think it's vaporware?

Because it hasn't been released, and it likely never will be. It's impossible to criticize a programming language without actually using it, so any discussion of its merits is moot without an actual release.

How long do you think it takes to make a new language?

Re: My least favorite Rust type

#48

Earlier quoted context omitted.

Because it hasn't been released, and it likely never will be. It's impossible to criticize a programming language without actually using it, so any discussion of its merits is moot without an actual release.

How long do you think it takes to make a new language?

How long do you think it takes to release a working prototype when you already have one?

Re: My least favorite Rust type

#49

Earlier quoted context omitted.

I don't know anything about Johnathan Blow, so could you explain why you have a hard time taking him seriously about PL design?

Because I can't download a compiler for his language and try out his ideas. I've designed fantasy programming languages, too, but you don't see me telling everyone on the internet that will listen to me about them, dragging other PL designers that have actually released working code through the mud as I do. It's a simple matter of put up or shut up.

I think that's a really toxic attitude. My thoughts about programming languages are still valid, even though I've never made one of my own. I have opinions about what works and what doesn't, based on experience using programming languages, and just because I haven't actually tried to write a compiler doesn't mean I should "shut up" about it.

If you don't like his ideas (or him) just ignore them. No one's forcing you to listen.

Post reply on HN