J2提案:关键字 [英] J2 proposal: keyword

查看:97
本文介绍了J2提案:关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

暂时将收集到的智慧放在一个地方,这就是我的

草案中的内容:

III。选择关键字


如果要在@或其他标点符号上选择关键字,则问题

仍然存在,它应该是哪个单词?已经提出了很多单词,并且

虽然我们可能会在这里推荐一个小数字,但更重要的是我们建立选择关键字的指南。关键字:


- 不应广泛用作现有Python代码中的标识符。

-编写新代码时应该很容易记住。

-在阅读现有代码时应该很容易记住。

-在文档和Google中都很容易搜索。

-不应该是计划好的未来。这排除了与...和

" as" (我可能会注意到这一点)。

-在这位作者看来(在这里回复我,人们),它不应该是装饰这个词的形式。术语装饰是指装饰。与两个单独的概念冲突:GoF Decorator模式(运行时

包装器,而不是编译时)和我们自己心爱的

" decorate-sort-undecorate"模式(又名Schwartzian或Guttman-Rosler

变换)。


关键字的候选人已分为两三个阵营,

强调装饰者的不同方面:


-Declarative:declare,predef,moddef

-Transformative:transform,wrap,modify,mutate

-Antributive / Annotative:修改,使用,具有

-directive:pragma,表示

-Associative:helper,qualify,qual,meta

-Cross-cutting:imbue,endow,toow,embellish,extend,累积,glom,

授予

-Prepositions / Adverbs:使用,通过,通过,通过

我有一个丑陋的段落促进' '宣布''作为最佳候选人,但我已经 b $ b总是喜欢''使用''(你们很多人在过去的24小时内提升了b
小时)。也许上面会在你们中产生进一步的两极分化。 ;)

Robert Brewer

MIS

Amor Ministries
fu ****** @ amor.org

解决方案

" Robert Brewer" <福****** @ amor.org>写道:

现在只是将收集的智慧放在一个地方,这就是我的
草稿中的内容:

III 。选择关键字

如果要在@或其他标点符号上选择关键字,问题
仍然存在,它应该是哪个词?已经提出了很多单词,虽然我们可能会在这里推荐一小部分,但更重要的是我们建立选择关键字的指南。关键字:

- 不应广泛用作现有Python代码中的标识符。
- 编写新代码时应易于记忆。
- 应该很容易记住在阅读现有代码时。
- 在文档和Google中都很容易搜索。
- 不应该是计划好的未来。这排除了与...和
as (我应该注意这一点)。
- 在这位作者看来(在这里支持我,人们),它不应该是装饰这个词的形式。术语装饰是指装饰。与两个单独的概念冲突:GoF Decorator模式(运行时
包装,而不是编译时),以及我们自己心爱的
decorate-sort-undecorate ;模式(又名Schwartzian或Guttman-Rosler
转换)。




加入我的略显愚蠢的派对帽子,我可以建议馅饼。遇见所有这些限制因素: - )


On Sun,2004年8月22日07:38:49 -0700,Robert Brewer

< fu ****** @ amor.org>写道:

- 关键词的候选人已经落入两三个阵营,并且
强调装饰者的不同方面:

- 声明:声明, predef,moddef
-Transformative:transform,wrap,modify,mutate
-Antributive / Annotative:修改,使用,具有
-Directive:pragma,表示
-Associative:helper, - 限制,限定,元素 - 切割:灌输,赋予,赋予,修饰,延伸,累积,支持,
赋予
- 预置/副词:使用,通过,通过,通过,通过






上下文中,只有这些单词的含义才会达成共识。成功:


foo =无论如何(foo)


我们中的一些人 - 至少我们中的一员 - 发现真正的一点

意义重大。它不能说比它说的更好,是

点,


而且我认为这是将事情推向极端以暗示<民意调查结果反映了社区在任何方向上的共识。

关于Guido

是否应允许自己,基本上缺乏共识受到这些民意调查的影响。


我对Guido的直觉一无所知。我确实认为他处于一个独特的位置,可以看到所有问题的大图和

工作。处于暴风雨的中心。


所以最后我可能最终完成了我所指控的事情

其他人在其他情况下做的事情 - 阅读@decorator语法

决定(假设*某些*语法是既成事实) - 发现它是明智的,因为可能超出其意图的原因。 />

Art


Robert Brewer写道:

III。选择关键字
[剪切好的原则列表] - 关键字的候选人已经分为两个或三个阵营,并且
强调装饰者的不同方面:

-Declarative:declare, predef,moddef
-Transformative:transform,wrap,modify,mutate
-Antributive / Annotative:修改,使用,具有
-Directive:pragma,表示
-Associative:helper, - 限制,限定,元素 - 切割:灌输,赋予,赋予,修饰,延伸,累积,支持,
赋予
- 预置/副词:使用,通过,通过,通过,通过

我有一个丑陋的段落宣传''宣告''作为最佳候选人,但我总是喜欢''使用''(你们很多人在过去推广24
小时)。也许上面会在你们中产生进一步的两极分化。 ;)




+1 onusing作为上面最好的选择。


我发现声明性的尴尬,变换不合适的时候

变换没有进行,定制的那些没关系(但是;修改

听起来就像之后必须来的那样),指令太像编译器一样,

联想不错但太抽象,横切太多像

" decorate"更不用说那种轻浮的声音和介词

大部分都太模糊了(除了再次使用)。


-Peter


Just to put collected wisdom in one spot for now, here''s what''s in my
draft:
III. Choosing a keyword

If a keyword is to be chosen over @ or other punctuation, the question
remains, "which word should it be?" Many words have been proposed, and
although we may recommend a small number here, it is more important that
we establish guidelines for the selection of a keyword. The keyword:

-Should not be used widely as an identifier in existing Python code.
-Should be easy to remember when writing new code.
-Should be easy to remember when reading existing code.
-Should be easy to search for, in both docs and Google.
-Should not be a word with a planned future. This rules out "with" and
"as" (I should probably footnote this).
-In this author''s opinion (back me up here, people), it should not be a
form of the word "decorate". The term "decorate" conflicts with two
separate concepts: both the GoF Decorator pattern (which is a runtime
wrapper, not a compile-time one), and with our own beloved
"decorate-sort-undecorate" pattern (aka Schwartzian or Guttman-Rosler
Transform).

-Candidates for keywords have fallen into two or three camps, and
emphasize different aspects of decorators:

-Declarative: declare, predef, moddef
-Transformative: transform, wrap, modify, mutate
-Attributive/Annotative: amend, using, having
-Directive: pragma, signify
-Associative: helper, qualify, qual, meta
-Cross-cutting: imbue, endow, bestow, embellish, extend, accum, glom,
confer
-Prepositions/Adverbs: using, through, per, via, by
I had an ugly paragraph promoting ''declare'' as a top candidate, but I''ve
always liked ''using'' (which many of you promoted within the past 24
hours). Maybe the above will produce further polarization among you. ;)
Robert Brewer
MIS
Amor Ministries
fu******@amor.org

解决方案

"Robert Brewer" <fu******@amor.org> wrote:

Just to put collected wisdom in one spot for now, here''s what''s in my
draft:
III. Choosing a keyword

If a keyword is to be chosen over @ or other punctuation, the question
remains, "which word should it be?" Many words have been proposed, and
although we may recommend a small number here, it is more important that
we establish guidelines for the selection of a keyword. The keyword:

-Should not be used widely as an identifier in existing Python code.
-Should be easy to remember when writing new code.
-Should be easy to remember when reading existing code.
-Should be easy to search for, in both docs and Google.
-Should not be a word with a planned future. This rules out "with" and
"as" (I should probably footnote this).
-In this author''s opinion (back me up here, people), it should not be a
form of the word "decorate". The term "decorate" conflicts with two
separate concepts: both the GoF Decorator pattern (which is a runtime
wrapper, not a compile-time one), and with our own beloved
"decorate-sort-undecorate" pattern (aka Schwartzian or Guttman-Rosler
Transform).



Putting on my "Slightly Silly Party" hat, may I suggest that "pie" meets
all of those constraints :-)


On Sun, 22 Aug 2004 07:38:49 -0700, "Robert Brewer"
<fu******@amor.org> wrote:

-Candidates for keywords have fallen into two or three camps, and
emphasize different aspects of decorators:

-Declarative: declare, predef, moddef
-Transformative: transform, wrap, modify, mutate
-Attributive/Annotative: amend, using, having
-Directive: pragma, signify
-Associative: helper, qualify, qual, meta
-Cross-cutting: imbue, endow, bestow, embellish, extend, accum, glom,
confer
-Prepositions/Adverbs: using, through, per, via, by



There is only consensus as to what any of those words would mean, in
context. Make happen:

foo=whatever(foo)

Some of us - at least one of us - find that a point with real
significance. It cannot be said better than it is being said, is the
point,

And I think it is stretching things to an extreme to imply that the
poll results reflect a concensus of the community in any direction.
There is a more fundamental lack of consensus as to whether Guido
should allow himself to be influenced by these kinds of polls.

I do not have blind faith in Guido''s instincts. I do think he is in a
unique position to see the Big Picture of all the issues and forces at
work. Being at the center of the storm.

So in the end I might have ended up doing exactly what I have accused
others of doing in other cases - reading into the @decorator syntax
decision (assuming *some* syntax is a fait accompli) - finding it to
be wise, for reasons perhaps beyond its intentions.

Art


Robert Brewer wrote:

III. Choosing a keyword [snip good list of principles] -Candidates for keywords have fallen into two or three camps, and
emphasize different aspects of decorators:

-Declarative: declare, predef, moddef
-Transformative: transform, wrap, modify, mutate
-Attributive/Annotative: amend, using, having
-Directive: pragma, signify
-Associative: helper, qualify, qual, meta
-Cross-cutting: imbue, endow, bestow, embellish, extend, accum, glom,
confer
-Prepositions/Adverbs: using, through, per, via, by

I had an ugly paragraph promoting ''declare'' as a top candidate, but I''ve
always liked ''using'' (which many of you promoted within the past 24
hours). Maybe the above will produce further polarization among you. ;)



+1 on "using" as the best of the choices above.

I find the declarative ones awkward, transform inappropriate when
transforming is not going on, attributive ones okay (but "amend"
sounds like it must come afterwards), directive too compiler-like,
associative not bad but too abstract, cross-cutting too much like
"decorate" not to mention sort of frivolous-sounding, and prepositions
mostly too vague (except for "using" again).

-Peter


这篇关于J2提案:关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆