summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-09-23 11:14:27 +0200
committerAndy Wingo <wingo@pobox.com>2017-09-23 11:14:27 +0200
commitb0ecf83ef0f3dfbfce808c2cfc88ff0c8d9809f1 (patch)
treece37041419fae8b1c3815b2a2756b74986060d60 /NEWS
parent84aa050f927d704344a7efca6b63607254e0b5b2 (diff)
Deprecate opaque struct fields
* NEWS: Add entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove mention of opaque field protection. * libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail): Remove discussion of opaque fields. (set_vtable_layout_flags): Issue a deprecation warning when opaque fields are used.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS14
1 files changed, 14 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 78e3b30c3..fec9af30f 100644
--- a/NEWS
+++ b/NEWS
@@ -67,6 +67,20 @@ structure. However this was a little used complication without any use
in Scheme code. To replace it, just use "p" slots and initialize the
slot values manually on initialization.
+** Struct fields with opaque ("o") protection deprecated
+
+Struct fields are declared with a "protection", meaning read-only ('r'),
+read-write ('w'), or opaque ('o'). There is also "hidden" ('o') which
+is read-write but which isn't initialized by arguments passed to
+`make-struct/no-tail', but that's a detail. Opaque struct fields were
+used to allocate storage in a struct that could only be accessed by C.
+This facility was very rarely used (unused in Guile itself) but now that
+we are implementing more and more in Scheme, it is completely useless.
+
+To enforce permissions on struct fields, instead layer on an abstraction
+at a higher level, in the same way that immutable record fields are
+simply those which don't have an accessor.
+
* Bug fixes
** Enable GNU Readline 7.0's support for "bracketed paste".