• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

self-referential definitions?

 
Jo Lee
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could any body explain what is self-referential definitions really mean?
and how to use it?
Thanks
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • 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;
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic