请教一句英语, With the Grain 是什么意思

2022-08-04 10:58:52 +08:00
 laolaowang

之前看到 网友推荐 You Don't Know JS Yet ?闲来无事,就是看了起来,第四章 有一个小节 标题是 ”With the Grain“,Google 翻译是”与谷物“,很难理解,搜索了半天, 最接近就是 https://forum.wordreference.com/threads/go-with-the-grain.3009091/ 一个回答,也不知道对不对

2280 次点击
所在节点    问与答
16 条回复
hyrepo
2022-08-04 11:04:29 +08:00
https://wiki.c2.com/?WithTheGrain

利用语言的原生特性
ht
2022-08-04 11:06:32 +08:00
grain 译作纹理,字面意思 with the grain 是顺着纹理。
引申一下,顺其自然,go with the grain 。

个人理解,不一定对。
lefthand2006
2022-08-04 11:07:05 +08:00
顺其自然?
laolaowang
2022-08-04 11:08:03 +08:00
@hyrepo 新知识又增加了,感谢
darkengine
2022-08-04 11:10:45 +08:00
随大流

大体来说,代码风格需要随 JS 的大流,不要整得跟 Java, Python 似的
从细的方面看,需要随团队、已有项目的大流,不要因为看了“You Don't Know JS Yet”这本书就想着推翻已有的东西
66beta
2022-08-04 11:11:52 +08:00
@darkengine 懂了,别动屎山
darkengine
2022-08-04 11:14:16 +08:00
@66beta 不一定是屎山,已有团队或项目有自己的风格,有时候不一定跟在书上看的一样,如何实现没有对错之分。
laolaowang
2022-08-04 11:16:51 +08:00
@66beta 哈哈!屎山到处有
ifdef
2022-08-04 11:16:55 +08:00
On the other hand, there's a grain you really should pay attention to and follow: the grain of how JS works, at the language level. There are things that work well and naturally in JS, given the right practice and approach, and there are things you really shouldn't try to do in the language.

Can you make your JS program look like a Java, C#, or Perl program? What about Python or Ruby, or even PHP? To varying degrees, sure you can. But should you?

No, I don't think you should. I think you should learn and embrace the JS way, and make your JS programs as JS'y as is practical. Some will think that means sloppy and informal programming, but I don't mean that at all. I just mean that JS has a lot of patterns and idioms that are recognizably "JS," and going with that grain is the general path to best success.

Finally, maybe the most important grain to recognize is how the existing program(s) you're working on, and developers you're working with, do stuff. Don't read these books and then try to change all that grain in your existing projects over night. That approach will always fail.

-----------

建议先读完,再思考,再提问。读英文文档不是做英译中。
laolaowang
2022-08-04 11:27:46 +08:00
@ifdef 确实,我习惯是看不明白,就去翻译,等我看到最后才注意到后面其实说的很明白了,是个坏习惯
laoyur
2022-08-04 12:04:52 +08:00
▸ to go against the grain (to do sth)
figurative 违反常理(做某事)

摘自 Mac 自带词典,那么 with the grain 也自然能解释了
dandycheung
2022-08-04 14:12:24 +08:00
入乡随俗。
zanyzephyr
2022-08-04 17:10:36 +08:00
对 11 楼进行补充:

against the grain 是一个 phrase 。
看解释,2 楼说的对,这里 grain 应该取的是 “纹理” 的意思。

以下同摘自 Mac 自带词典:
```
PHRASES
against the grain
contrary to the natural inclination or feeling of someone or something: it goes against the grain to tell outright lies.
[from the fact that wood is easier to cut along the line of the grain.]
```
bobo2
2022-08-04 18:29:41 +08:00
厉害,我都是找的译版
zjuster
2022-08-04 20:39:20 +08:00
To go with the grain (idiom) = to accept something rather than oppose it or fight against it.

其实你用谷歌搜这个词,如果没有结果的时候,额外加上 meaning 就可以搜到了。

这个词组刚好是因为被实体店 SEO 掉了,没出释义
zjuster
2022-08-04 20:41:35 +08:00
@laolaowang 高中考试做阅读理解,无论中英文,其实都要通读全文,再回头来看。
一两个单词不认识,通常不会影响到对全文理解。

我们考英语专业八级的时候,必然会遇到不认识的单词的,但不会影响做题(甚至有些题目,就是让你选这个特别生僻的词是什么意思)。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/870587

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX