Live data from Hacker News

Rust 1.53

blog.rust-lang.org

31–40 of 98 posts

Re: Rust 1.53

#31

> Identifiers can now contain non-ascii characters. All valid identifier characters in Unicode as defined in UAX #31 can now be used. That includes characters from many different scripts and languages, but does not include emoji. Don't despair fellow emoji devs, our time will come soon enough.

Animated GIF meme identifier devs of the world unite! We will overthrow this repressive violence against our kind. Baby dance will be the next "Hello, world!"

Re: Rust 1.53

#32
post #30

Earlier quoted context omitted.

In the English speaking world, I have a hard time justifying untypeable identifiers. Maybe, and this is a fat maybe, Greek symbols could make the odd write-once math or scientific code easier to read. It would be bonkers to use any non-ascii codepoints in a public API.

I like to use the poop emoji in the names of methods that are dangerous hacks that we want to (eventually) get rid of. Being harder to type is part of the point.

Can't you just use poop emoji in comments and search for them like TODOs?

Re: Rust 1.53

#33

Earlier quoted context omitted.

> Maybe, and this is a fat maybe, Greek symbols could make the odd write-once math or scientific code easier to read. The Julia community has been trying really hard to convince people that this is a good idea and I'm still not on board with it.

maybe we can have some keyboard plugin/"mode" that merges letters to form symbols in special way? Korean windows have a "special-emoji" keyboard that can be invoked by: 1. type a charactor 2. press 'hanja' key 3. (wild special character selection menu appears) example: § (from 'ㅁ') / ㈜ (from 'ㅁ') / ㎖ (from 'ㄹ')

Most Linux environments already have this, it's called "compose key". You may need to enable it in your desktop environment's settings, but then after pressing the key you can press !? to type ‽, 12 to type ½, https://help.ubuntu.com/community/GtkComposeTable

Re: Rust 1.53

#34

Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?

Don't unless it's to advance a particular career development or personal project goal. I left Go because it became a yuppie slum of trend-seekers riding a wave and leeching rather than contributing: blog hype and too many dumb support requests/questions. Making powerful languages too easy to get started without any understanding results in burdensome, low-signal distractions of maintainers and contributors.

This appears like it may happen with Rust but I hope it doesn't. It's a good thing it won't ever happen with Haskell, which is my warm safety-blanket should any particular language community implode.

Re: Rust 1.53

#35
post #29

Earlier quoted context omitted.

> I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer This notion is common among those who are first considering Rust, but also quite overblown in practice. The only thing that reasonably qualifies as "esoteric" in Rust is borrow checking and lifetimes, and these can be mitigated by using very simple idioms/patterns like cloning objects via .clone() or using copy-on-writ…

Disagree - a low level language can’t really mask itself as high level, the abstraction will always leak. Don’t get me wrong, Rust is a really great language and it is a very welcome addition to the for a long time seemingly stagnant low level world, but you won’t be able to refactor logic-related parts “without a thought” on memory layout, even ownership, etc —- something trivially done in high level languages. C++…

For many, learning the low-level aspects of programming is the attraction of learning Rust. They want to be exposed to these concepts. What Rust does well is creating a golden pathway with guard rails through which one can learn these concepts without exposing oneself to the pitfalls of memory safety issues, thread safety issues and undefined behaviour.

Re: Rust 1.53

#36
post #6

Earlier quoted context omitted.

You can spend the time on it since you will make it up by not having to worry about your awful C++ dependency/build system which is the language targeted by rust to replace (/complement) ;)

Do you recommend it for those developers not working in the C/C++ space?

[deleted]

Re: Rust 1.53

#37
post #29

Earlier quoted context omitted.

Disagree - a low level language can’t really mask itself as high level, the abstraction will always leak. Don’t get me wrong, Rust is a really great language and it is a very welcome addition to the for a long time seemingly stagnant low level world, but you won’t be able to refactor logic-related parts “without a thought” on memory layout, even ownership, etc —- something trivially done in high level languages. C++…

For many, learning the low-level aspects of programming is the attraction of learning Rust. They want to be exposed to these concepts. What Rust does well is creating a golden pathway with guard rails through which one can learn these concepts without exposing oneself to the pitfalls of memory safety issues, thread safety issues and undefined behaviour.

I absolutely agree, this was the line I was arguing with: “You can then code with much the same convenience as e.g. Python, Java or C#”

Re: Rust 1.53

#38
post #30

Earlier quoted context omitted.

I like to use the poop emoji in the names of methods that are dangerous hacks that we want to (eventually) get rid of. Being harder to type is part of the point.

Can't you just use poop emoji in comments and search for them like TODOs?

I assume making the name of the function they want to eventually get rid of more annoying to type is part of the reason to do this rather than just tracking ones needing replacement.

Re: Rust 1.53

#39
post #30

Earlier quoted context omitted.

I like to use the poop emoji in the names of methods that are dangerous hacks that we want to (eventually) get rid of. Being harder to type is part of the point.

Can't you just use poop emoji in comments and search for them like TODOs?

But then others won't feel dirty when they use the method. The goal is to make people feel bad when they add more usages of it and make it harder to remove. This is the case when it's easier and faster than the proper way. When there is crunch time it's hard to push your lead to reject the PR so it's soft pressure and it's apparent at the call site whereas a TODO in the method definition is not.

Re: Rust 1.53

#40

Earlier quoted context omitted.

> Maybe, and this is a fat maybe, Greek symbols could make the odd write-once math or scientific code easier to read. The Julia community has been trying really hard to convince people that this is a good idea and I'm still not on board with it.

maybe we can have some keyboard plugin/"mode" that merges letters to form symbols in special way? Korean windows have a "special-emoji" keyboard that can be invoked by: 1. type a charactor 2. press 'hanja' key 3. (wild special character selection menu appears) example: § (from 'ㅁ') / ㈜ (from 'ㅁ') / ㎖ (from 'ㄹ')

It would be nice if this were built into Windows, but in lieu of that, I have been using WinCompose[0] for several years for typing diacritics (as part of my learning French). For example:

* ALT e' = é

* ALT u " = ü

* ALT n ~ = ñ

It's not limited to diacritics; you can type ligatures (ALT ae = æ), extended characters (ALT [/] = ), I assume the majority of UTF (ALT #G = 𝄞) and so on. And yes, even emoji (ALT ALT alembic = )

edit: apparently, HN won't show the checkbox (U+2611) or alembic[1].

[0] http://wincompose.info/

[1] https://emojipedia.org/alembic/

Post reply on HN