Re: Another RFC on setting and getting.

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.gui
Message-ID <[email protected]>
Glynn Clements <[email protected]> writes:
> Read-only or write-only attributes could be implemented by throwing
> an error for prohibited operations. Read-only attributes could be
> implemented by simply ignoring write operations.

If there is an alternative design which would allow errors to be
reported statically (e.g., by using the typesystem or by not providing
a 'set' operation for the offending attribute or whatever), then I
think it would be significantly better.  One of Haskell's huge
strengths is that static error detection catches so many errors that
would otherwise make it through to be caught by (dynamic) testing or
included in released systems.

--
Alastair Reid                 [email protected]  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.