Re: Making immutable instances



Steven D'Aprano <steve@xxxxxxxxxxxxxxxxxxxxxx> writes:
> "Hmmm, the class designer didn't want me adding attributes to instances...
> maybe he had a good reason for that..."

When it was suggested that a facility for doing this be added to the
language, I asked for a use case for it. Nobodies come up with a
reason for placing such restriction on the client yet. If you've got a
use case, I'd be interested in hearing it.

<mike
--
Mike Meyer <mwm@xxxxxxxxx> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
.



Relevant Pages

  • Re: Controlling Javascript from server side
    ... but five different language implementations here. ... 'true' means that the request must be handled asynchronously. ... There is exactly *no* reason for such a thing here. ... | percent-endoded string). ...
    (comp.lang.javascript)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... overall familiarity with the tested platform, language or topic. ... The decrement happens BEFORE the assignment (simple ... Question 16 is trivial if you discount the possibility that the break ... Nor is there any reason why you couldn't use structs to implement a ...
    (comp.programming)
  • Re: Islam was spread by the sword? What about Christianity?
    ... >No wonder Jews and Muslims both feel threatened by the Christian ... Here's the Pope making an address to academics in which he specifically ... And we see threats of violence - not reason - demands that the Pope ... language) is to go along with the emotive backlash reaction that the ...
    (uk.religion.christian)
  • Re: jQuerys latest stab at competence
    ... people are js gods - the creators and implementers of the language). ... specific javascript language/standard issues. ... HTML and CSS - the advice rendered by the knowledgeable on this group ... I can buy this - but not as a good reason. ...
    (comp.lang.javascript)
  • Re: Results of the memswap() smackdown from the thread "Sorting" assignment
    ... goto in C, any "GO TO" feature of a language isn't a threat. ... I see no reason for you to ... how can it even be valid to "swap ...
    (comp.programming)