X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/b51bad08b3d287ae7b1c67a4b243eaf6ac745fc0..08b98c54cbfc5643674b46dd62cc42a90a004199:/NEWS diff --git a/NEWS b/NEWS index f6d4003f8..25a081053 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,51 @@ debugging evaluator gives better error messages. * Changes to Scheme functions and syntax +** New function 'unsetenv'. + +** There is support for Infinity and NaNs. + +Following PLT Scheme, Guile can now work with infinite numbers, and +'not-a-numbers'. + +There is new syntax for numbers: "+inf.0" (infinity), "-inf.0" +(negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as +"+nan.0"). These numbers are inexact and have no exact counterpart. + +Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the +sign of the dividend. The infinities are integers, and they answer #t +for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is +not '=' to itself, but '+nan.0' is 'eqv?' to itself. + +For example + + (/ 1 0.0) + => +inf.0 + + (/ 0 0.0) + => +nan.0 + + (/ 0) + ERROR: Numerical overflow + +Two new predicates 'inf?' and 'nan?' can be used to test for the +special values. + +** Inexact zero can have a sign. + +Guile can now distinguish between plus and minus inexact zero, if your +platform supports this, too. The two zeros are equal according to +'=', but not according to 'eqv?'. For example + + (- 0.0) + => -0.0 + + (= 0.0 (- 0.0)) + => #t + + (eqv? 0.0 (- 0.0)) + => #f + ** We now have uninterned symbols. The new function 'make-symbol' will return a uninterned symbol. This @@ -50,8 +95,37 @@ when evaluated and simply be ignored in a definition context. Use `substring-move!' instead. +** Deprecated: procedure->macro + +Change your code to use either procedure->memoizing-macro or, probably better, +to use r5rs macros. Also, be aware that macro expansion will not be done +during evaluation, but prior to evaluation. + * Changes to the C interface +** The SCM_VELTS macros now returns a read-only vector. For writing, +use the new macros SCM_WRITABLE_VELTS, SCM_SET_VECTOR_LENGTH. The use +of SCM_WRITABLE_VELTS is discouraged, though. + +** Garbage collector rewrite. + +The garbage collector is cleaned up a lot, and now uses lazy +sweeping. This is reflected in the output of (gc-stats); since cells +are being freed when they are allocated, the cells-allocated field +stays roughly constant. + +For malloc related triggers, the behavior is changed. It uses the same +heuristic as the cell-triggered collections. It may be tuned with the +environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage +for minimum yield of malloc related triggers. The default is 40. +GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The +default is 200 kb. + +Debugging operations for the freelist have been deprecated, along with +the C variables that control garbage collection. The environment +variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2, +GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used. + ** The struct scm_cell has been renamed to scm_t_cell This is in accordance to Guile's naming scheme for types. Note that @@ -68,9 +142,9 @@ cause aborts in long running programs. The new functions are more symmetrical and do not need cooperation from smob free routines, among other improvements. -The new functions are scm_malloc, scm_realloc, scm_strdup, -scm_strndup, scm_gc_malloc, scm_gc_realloc, scm_gc_free, -scm_gc_register_collectable_memory, and +The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup, +scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc, +scm_gc_free, scm_gc_register_collectable_memory, and scm_gc_unregister_collectable_memory. Refer to the manual for more details and for upgrading instructions. @@ -105,6 +179,45 @@ had problems because with them allocation and initialization was separated and the GC could sometimes observe half initialized cells. Only careful coding by the user of SCM_NEWCELL and SCM_NEWCELL2 could make this safe and efficient. +** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated. + +Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p +instead. + +** SRCBRKP has been deprecated. + +Use scm_c_source_property_breakpoint_p instead. + +** Deprecated: scm_makmacro + +Change your code to use either scm_makmmacro or, probably better, to use r5rs +macros. Also, be aware that macro expansion will not be done during +evaluation, but prior to evaluation. + +** Removed from scm_root_state: def_inp, def_outp, def_errp, together +with corresponding macros scm_def_inp, scm_def_outp and scm_def_errp. +These were undocumented and unused copies of the standard ports at the +time that Guile was initialised. Normally the current ports should be +used instead, obtained from scm_current_input_port () etc. If an +application needs to retain earlier ports, it should save them in a +gc-protected location. + +** Removed compile time option MEMOIZE_LOCALS + +Now, caching of local variable positions during memoization is mandatory. +However, the option to disable the caching has most probably not been used +anyway. + +** Removed compile time option SCM_RECKLESS + +Full number of arguments checking of closures is mandatory now. However, the +option to disable the checking has most probably not been used anyway. + +** Removed compile time option SCM_CAUTIOUS + +Full number of arguments checking of closures is mandatory now. However, the +option to disable the checking has most probably not been used anyway. + ** Removed definitions: scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify, scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2, scm_tc16_allocated,