473,545 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

J2 proposal: keyword

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.o rg
Jul 18 '05 #1
14 1472
"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 :-)
Jul 18 '05 #2
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(fo o)

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
Jul 18 '05 #3
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
Jul 18 '05 #4
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(fo o)

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
Jul 18 '05 #5
On Sun, 22 Aug 2004 16:08:44 GMT, Arthur <aj******@opton line.com> wrote:
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.


As someone else said at some point during the last two weeks of
decorator discussions - we're all using a language that, by and large,
is Guido's design. He's done a good job so far of producing something
that's excellent - I trust him to produce a good result here.

I hope the final decision ends up getting less vitriolic responses
than the 2.4a2 release got.
Jul 18 '05 #6
On Sun, 22 Aug 2004 16:08:44 GMT, Arthur <aj******@opton line.com> wrote:
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.


As someone else said at some point during the last two weeks of
decorator discussions - we're all using a language that, by and large,
is Guido's design. He's done a good job so far of producing something
that's excellent - I trust him to produce a good result here.

I hope the final decision ends up getting less vitriolic responses
than the 2.4a2 release got.
Jul 18 '05 #7
"Robert Brewer" <fu******@amor. org> writes:
-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


Not sure where these would go: prologue, preamble, preface

How about something like "def_using" ?
Jul 18 '05 #8
Hi,

+1, also, on "using".

John
Jul 18 '05 #9
Certainly "using... def..." comes across very clearly to me. I think
it the best of the proposed keywords.
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1476
by: RebelGeekz | last post by:
Just my humble opinion: def bar(low,high): meta: accepts(int,int) returns(float) #more code Use a metadata section, no need to introduce new messy symbols, or mangling our beloved visual cleanliness of python.
2
1699
by: Guido van Rossum | last post by:
Robert and Python-dev, I've read the J2 proposal up and down several times, pondered all the issues, and slept on it for a night, and I still don't like it enough to accept it. The only reason to accept it would be to pacify the supporters of the proposal, and that just isn't a good enough reason in language design. However, it got...
31
2400
by: Brian Sabbey | last post by:
Here is a pre-PEP for what I call "suite-based keyword arguments". The mechanism described here is intended to act as a complement to thunks. Please let me know what you think. Suite-Based Keyword Arguments ----------------------------- Passing complicated arguments to functions is currently awkward in Python. For example, the typical...
3
1733
by: steve donovan | last post by:
Hi everyone, I was wondering if anybody had made a proposal for deducing variable type in assigments. This is in effect exactly what is happening in "Dim list As new ArrayList()" and a variant of this idea is being considered for the new C++ standard (as a use for the obsolete 'auto' keyword) In effect, the idea is to reduce unnecessary...
34
1816
by: glomde | last post by:
i I would like to extend python so that you could create hiercical tree structures (XML, HTML etc) easier and that resulting code would be more readable than how you write today with packages like elementtree and xist. I dont want to replace the packages but the packages could be used with the new operators and the resulting IMHO is much...
26
2686
by: brenocon | last post by:
Hi all -- Compared to the Python I know and love, Ruby isn't quite the same. However, it has at least one terrific feature: "blocks". Whereas in Python a "block" is just several lines of locally-scoped-together code, in Ruby a "block" defines a closure (anonymous function). To avoid confusion let's call them Ruby block-closures. I see...
0
1061
by: Victor Bazarov | last post by:
aitorf666@gmail.com wrote: My bet is that it's not going to happen. Too late. Many compilers have already implemented the && syntax. Besides, would you allow the keyword 'mutable' to be used in the context of declaring a pointer to something? What if you want to declare a mutable data member that is itself an r-value reference? ...
7
1054
by: python-pep | last post by:
Hi, sorry, I have these ideas for longer than 10 years, please have a look on it and comment on it. Thx. ---- This is another proposal for introducing types into Python.
56
6673
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under 6.4.2(2) : case constant-expression : I propose that the case expression of the switch statement be changed from "integral constant-expression" to...
0
7459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7411
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7749
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5965
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3444
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3439
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
695
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.