RE: J2 paper 0.2.1

Discussion in 'Python' started by Robert Brewer, Aug 23, 2004.

  1. Colin J. Williams wrote:
    > One nit picking comment on Robert Brewer's document: An
    > annotation is a
    > transformation of a function, as a change to the flow of control is.


    I'd like someone to analyze that further. "Transform", like the word
    "change", can mean almost anything in English. However, I find the use
    of the term in programs to generally mean either coerce/convert/cast
    between types, or some other mechanism whereby one object is supplied,
    and another object returned. That is, "transform" affects Being/"is" as
    opposed to Attribute/"has".

    However, neither your "gut feeling" nor mine about the issue is
    enough--we need a more rigorous heuristic to decide. Finding precedent
    would be a good start, if anyone wants to try.


    Robert Brewer
    MIS
    Amor Ministries
    Robert Brewer, Aug 23, 2004
    #1
    1. Advertising

  2. Robert Brewer

    Paul McGuire Guest

    "Robert Brewer" <> wrote in message
    news:...
    Colin J. Williams wrote:
    > One nit picking comment on Robert Brewer's document: An
    > annotation is a
    > transformation of a function, as a change to the flow of control is.


    I'd like someone to analyze that further. "Transform", like the word
    "change", can mean almost anything in English. However, I find the use
    of the term in programs to generally mean either coerce/convert/cast
    between types, or some other mechanism whereby one object is supplied,
    and another object returned. That is, "transform" affects Being/"is" as
    opposed to Attribute/"has".

    However, neither your "gut feeling" nor mine about the issue is
    enough--we need a more rigorous heuristic to decide. Finding precedent
    would be a good start, if anyone wants to try.


    Robert Brewer
    MIS
    Amor Ministries
    Paul McGuire, Aug 23, 2004
    #2
    1. Advertising

  3. Robert Brewer

    Paul McGuire Guest

    "Robert Brewer" <> wrote in message
    news:...
    Colin J. Williams wrote:
    > One nit picking comment on Robert Brewer's document: An
    > annotation is a
    > transformation of a function, as a change to the flow of control is.


    I'd like someone to analyze that further. "Transform", like the word
    "change", can mean almost anything in English. However, I find the use
    of the term in programs to generally mean either coerce/convert/cast
    between types, or some other mechanism whereby one object is supplied,
    and another object returned. That is, "transform" affects Being/"is" as
    opposed to Attribute/"has".



    (sorry about the double post - damned newsreader!)

    I saw this earlier and meant to comment on it. How does annotating a
    function transform it? Does adding a docstring or ascribing authorship
    change the function's behavior or logic? Do you mean "annotation" in the
    Java or C# sense? If so, I think you are correct. But I chalk this up to
    those languages' poor use of the term "annotation." I think Robert is using
    "annotation" in the more general conversational sense.

    If you interpret "transform" to mean "change in any way," well then it is
    hardly a meaningful term to use for categorizing types of changes. I read
    Robert's use of "transform" to mean specifically "change the
    logic/behavior/interface", whereas "annotation" refers to commentary,
    version, copyright, or other notational attributes. (I could contrive a
    very narrow example, in which code logic may branch depending upon the value
    of __version__, but this is a stretch. More likely, code in the *caller*
    may change depending on __version__, but then this would be a transformation
    of the *caller*.)

    I think Robert cites a useful test. Things like synchronize, memoize,
    staticmethod all extend the behavior of the embedded function, thereby
    transforming it to lock, cache results, or change interface, *AND* a
    different object is returned.

    However, annotations such as author, version, and copyright merely add
    attributes to the function, but do not need to return a new object.

    I would not include preconditions or postconditions or argument type
    checking into either of these groups by the way - while they do change
    behavior (by adding checking code), I think they are their own special case
    of "transform", that are specifically oriented to defining assertions to be
    met (without cluttering the code of the embedded function). Maybe instead
    of "transformational" they could be called "assertional."

    My $0.02,
    -- Paul
    Paul McGuire, Aug 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2hpYXJh?=

    crystal report paper size

    =?Utf-8?B?Q2hpYXJh?=, Apr 28, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    9,787
    =?Utf-8?B?Q2hpYXJh?=
    Apr 28, 2005
  2. Prabhat Gupta

    DesignCon 2002 Paper

    Prabhat Gupta, Feb 27, 2004, in forum: VHDL
    Replies:
    2
    Views:
    503
    Prabhat Gupta
    Feb 27, 2004
  3. FPT'06 Bangkok Thailand

    FPT'06: First Call-for-paper

    FPT'06 Bangkok Thailand, Feb 19, 2006, in forum: VHDL
    Replies:
    0
    Views:
    727
    FPT'06 Bangkok Thailand
    Feb 19, 2006
  4. william.reynolds

    Setting paper size through VB.NET code

    william.reynolds, Dec 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    4,967
    william.reynolds
    Dec 12, 2005
  5. rickman
    Replies:
    9
    Views:
    869
    Colin Paul Gloster
    Jul 21, 2009
Loading...

Share This Page