You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
📅 2022.06.06
大橙子的小迪子🍊:
let a = ‘abc’
大橙子的小迪子🍊:
a[0]
大橙子的小迪子🍊:
@lencx rust不允许这样取呀
lencx:
肯定不行啊
lencx:
单引号是 char 类型
大橙子的小迪子🍊:
字符串可以吗
lencx:
看文档
lencx:
写代码不是靠猜啊
lencx:
rust 取索引是通过 .
lencx:
比如 a.0
大橙子的小迪子🍊:
那这个是不是取的字节索引
lencx:
这种问题自己搜 一下不就知道了
大橙子的小迪子🍊:
好的
大橙子的小迪子🍊:
这个变化挺大的
lencx:
学新语言是可以通过对比去学习,但是不能硬套啊,每种语言都有自己的心智模型,而不是写 Rust 版的 JS…
lencx:
看文档就是学习该语言的表达方式
不精通react不改名:
rust版本的js在哪在哪
lencx:
而不是靠经验去猜,毫无意义
大橙子的小迪子🍊:
这个括号里面的数字代表的是字节索引吧
lencx:
用 js 的思维方式写 rust,不就是 rust 版的 js 吗
不精通react不改名:
确实
Beta Was this translation helpful? Give feedback.
All reactions