• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

self-referential definitions?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could any body explain what is self-referential definitions really mean?
and how to use it?
Thanks
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Self-referential definition *I think* means a word who's definition includes the word itself.
Like ummmm "ubiquitousness - something that is ubiquitous".
So by that idea, I would thing a self-referential definition in Java would be an expression that uses the variable in its own definition ??
x = 3 * x;
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The way that I've seen this term used is when referring to some sort of complex data structure of arbitrary size. You see this a lot in the JLS as there is much discussion of data structures. From the JLS, §8.4.1 Formal Parameters:


FormalParameterList:
   FormalParameter
   FormalParameterList , FormalParameter


In this case, we're defining a FormalParameterList in terms of itself. This allows us to easily describe something of arbitrary length. I used google and also came up with this site that discusses the topic.
There may very well be other contexts for this term and it might be helpful if you could provide us with the context from which you found the term so we know how it is being used. Jess' answer could very well be more appropriate for your context than this one.
I hope that helps,
Corey
[ June 05, 2002: Message edited by: Corey McGlone ]
 
Jo Lee
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the context is as following:
inside the class scope and block scopes, we can also declare instances of the class(---> self-referential definitions) and refer to any of the variables and mehtods without the need for a prefix
thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic