Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Preventing a class from being instantiated
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kaz Kylheku  
View profile  
 More options Nov 28 2001, 10:27 pm
Newsgroups: comp.lang.lisp
From: k...@ashi.footprints.net (Kaz Kylheku)
Date: Thu, 29 Nov 2001 03:27:25 GMT
Local: Wed, Nov 28 2001 10:27 pm
Subject: Re: Preventing a class from being instantiated

In article <m3vgfu5mgo....@kappa.unlambda.com>, James A. Crippen wrote:
>How do I prevent a class from being instantiated under any
>circumstances?

One good way is not to write that class, and consequently not
encumber the user of the class with your restrictions.

> I am constructing a largish class tree and the
>rootmost classes are really only meant as umbrella classes that
>shouldn't be instantiated at any time.  I'm not sure exactly how to
>prevent them from being instantiated, however.  Any ideas?

How about writing some documentation which describe the purpose
of your classes according to your view of the world as their author.
People that agree will then not instantiate them.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.