Live data from Hacker News

‘~’ is being removed from Rust

github.com

41–50 of 117 posts

Re: ‘~’ is being removed from Rust

#41
Is the comparison to Python that great? A language like Rust has more things that you have to keep track of yourself, as a programmer. Having English-like syntax might work great in a language with relatively simple semantics, but I don't think that it necessarily follows at all that that kind of design scales to languages where you have to be explicit on the level of pointer types and such.

Re: ‘~’ is being removed from Rust

#42
post #18

Earlier quoted context omitted.

These keyboards usually don't have a convenient way to type {}[] either, these are AltGr + number keys in the German and French layouts for example. The keyboard situation doesn't seem to be as bad as for the degree sign °, which doesn't seem to be typeable on an English keyboard at all.

French layout keyboards do have a convenient way to type {}[], for me with Canadian French it is under 7890 using alt.

French Canadian keyboards are fairly different from European French keyboards:

French Canadian: http://www3.uakron.edu/modlang/french/images/kbd4.gif

European French: http://www.fentek-ind.com/images/frenchkeytop.gif

Re: ‘~’ is being removed from Rust

#43
post #34

I'll be honest: Rust is kind of losing me with these changes. I started following/tracking the language about a year ago, and I thought the syntax looked really succinct and easily readable back then, but with changes like this, [T] => Vec , the region/lifetime syntax, together with the propensity to abbreviate almost everything, code is quickly starting to look kind of soupy to me. I get the arguments, and they're l…

I guess it's a language primarily by and for text editor users, and I'm beyond that point these days.

What do you mean?

EDIT: Imagine a programming language designed around an IDE. Fun thought. Not sure whether it's a useful thought, but it's fun to think about.

Re: ‘~’ is being removed from Rust

#44
post #39

Earlier quoted context omitted.

Thank you. That's exactly our thought process too, though there is some reasonable disagreement about it.

I've been reading a bunch of tutorials and such, including the official one, about Rust recently and you'd get the impression that using unique pointers were the norm. This discussion seems to suggest they should be generally avoided. Now I'm not sure if I've just been massively misreading everything (I come from a background in GC languages) or whether the messaging about usage is way off.

Well, the official pointer tutorial, which I wrote, says right up front that you should prefer stack allocation: http://static.rust-lang.org/doc/master/guide-pointers.html

Unique pointers are one of Rust's newest, shiniest features, so they do get talked about a lot. Probably disproportionally so.

Honestly, it's probably that the docs are still coming together. The tutorial is notoriously poor, Mozilla has hired someone to work on it, but the fixes haven't surfaced yet.

Re: ‘~’ is being removed from Rust

#45
post #34

I'll be honest: Rust is kind of losing me with these changes. I started following/tracking the language about a year ago, and I thought the syntax looked really succinct and easily readable back then, but with changes like this, [T] => Vec , the region/lifetime syntax, together with the propensity to abbreviate almost everything, code is quickly starting to look kind of soupy to me. I get the arguments, and they're l…

I guess it's a language primarily by and for text editor users, and I'm beyond that point these days. What do you mean? EDIT: Imagine a programming language designed around an IDE. Fun thought. Not sure whether it's a useful thought, but it's fun to think about.

Text Editor vs IDE.

Re: ‘~’ is being removed from Rust

#46
post #38
post #31

Earlier quoted context omitted.

That's a specious argument IMO. The same case can be made for the pipe/vertical bar character. So I guess they have to remove that from the language too so Mac users won't be mildly inconvenienced.

You do not have to type a space though to get a pipe character. Tilde and backtick are the two characters which are hardest to write on a Swedish keyboard.

I actually use a Swedish keyboard and I've never found these dead keys to be a problem myself.

Vertical bar/pipe isn't shown on most European Macbook keyboards, nor is backslash in fact, so I guess backslash has to be removed too.

I'm just saying it's not a great argument.

Re: ‘~’ is being removed from Rust

#47

Earlier quoted context omitted.

I guess it's a language primarily by and for text editor users, and I'm beyond that point these days. What do you mean? EDIT: Imagine a programming language designed around an IDE. Fun thought. Not sure whether it's a useful thought, but it's fun to think about.

Text Editor vs IDE.

Hmm... I don't understand why it has to be Text Editor vs IDE. The two concepts are orthogonal. One is for editing text; the other is for understanding and autocompleting text. If their concern is that there aren't any good tools for Rust yet, that'll be solved with time.

Re: ‘~’ is being removed from Rust

#48
post #23

Earlier quoted context omitted.

Thanks for the explanation! This change makes the code more clear to me. When I first read some rust code, those ~ and @ are annoying because I don't know their meaning and hard to search them for a explanation. The box keyword is a much better way for developers.

Thank you. That's exactly our thought process too, though there is some reasonable disagreement about it.

As an early learner of Rust, but with strong experience in C++, I also agree with this choice. It seems much clearer to me than ~ and @.

And thanks for the explanations and the tutorial !

Re: ‘~’ is being removed from Rust

#49

Earlier quoted context omitted.

Thank you. That's exactly our thought process too, though there is some reasonable disagreement about it.

As an early learner of Rust, but with strong experience in C++, I also agree with this choice. It seems much clearer to me than ~ and @. And thanks for the explanations and the tutorial !

Any time. Glad you like them.

Re: ‘~’ is being removed from Rust

#50
post #34

I'll be honest: Rust is kind of losing me with these changes. I started following/tracking the language about a year ago, and I thought the syntax looked really succinct and easily readable back then, but with changes like this, [T] => Vec , the region/lifetime syntax, together with the propensity to abbreviate almost everything, code is quickly starting to look kind of soupy to me. I get the arguments, and they're l…

Odd, I've just been getting the impression that the language is become much, much readable. I agree with thestinger, here:

> uses and instead of &&, or instead of ||, list instead of [] and so on. Most people find it far easier to read and search for these than the sigil alternatives. The avoidance of more than one way to do the same thing (like including both ~T and Box) is another reason why people find Python easy to read.

Post reply on HN