/[guile]/guile/guile-core/doc/ref/deprecated.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/deprecated.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.2 by ossau, Fri Mar 15 09:23:18 2002 UTC revision 1.1.2.3 by ossau, Fri Mar 29 20:11:13 2002 UTC
# Line 4  Line 4 
4    
5  @menu  @menu
6  * Shared And Read Only Strings::  * Shared And Read Only Strings::
7    * Sloppy Membership::           `Sloppy' list membership procedures.
8    * Strange Eval::                Strange variations on `eval'.
9    * Close All Ports::             Closing all ports except some ...
10    * C Module Reg::                Old method for registering C modules.
11    * Removed Items::               Previously deprecated, now removed.
12  @end menu  @end menu
13    
14    
# Line 138  ERROR: Wrong type argument (expecting ST Line 143  ERROR: Wrong type argument (expecting ST
143  Return @code{#t} if @var{obj} is either a string or a symbol,  Return @code{#t} if @var{obj} is either a string or a symbol,
144  otherwise return @code{#f}.  otherwise return @code{#f}.
145  @end deffn  @end deffn
146    
147    
148    @node Sloppy Membership
149    @section `Sloppy' List Membership Procedures
150    
151    The following are equivalent to @code{memq}, @code{memv} and
152    @code{member} respectively, except that they do not fully type-check the
153    arguments that they are given.  They are deprecated because the lack of
154    proper type-checking makes them dangerous.
155    
156    @deffn {Scheme Procedure} sloppy-memq x lst
157    @deffnx {C Function} scm_sloppy_memq (x, lst)
158    This procedure behaves like @code{memq}, but does no type or error checking.
159    Its use is recommended only in writing Guile internals,
160    not for high-level Scheme programs.
161    @end deffn
162    
163    @deffn {Scheme Procedure} sloppy-memv x lst
164    @deffnx {C Function} scm_sloppy_memv (x, lst)
165    This procedure behaves like @code{memv}, but does no type or error checking.
166    Its use is recommended only in writing Guile internals,
167    not for high-level Scheme programs.
168    @end deffn
169    
170    @deffn {Scheme Procedure} sloppy-member x lst
171    @deffnx {C Function} scm_sloppy_member (x, lst)
172    This procedure behaves like @code{member}, but does no type or error checking.
173    Its use is recommended only in writing Guile internals,
174    not for high-level Scheme programs.
175    @end deffn
176    
177    
178    @node Strange Eval
179    @section Strange Variations on `eval'
180    
181    @code{eval2} was useful in previous Guile releases because the
182    @code{eval} in those releases was a single argument @code{eval} that did
183    not conform to R5RS.  Guile's standard @code{eval} now requires a second
184    environment-specifier argument (which Guile interprets as the module in
185    which to evaluate the specified code expression).  Hence @code{eval} is
186    now R5RS-compliant, and @code{eval2} is obsolete and therefore
187    deprecated.
188    
189    @deffn {Scheme Procedure} eval2 obj env_thunk
190    @deffnx {C Function} scm_eval2 (obj, env_thunk)
191    Evaluate @var{exp}, a Scheme expression, in the environment
192    designated by @var{lookup}, a symbol-lookup function.
193    Do not use this version of eval, it does not play well
194    with the module system.  Use @code{eval} or
195    @code{primitive-eval} instead.
196    @end deffn
197    
198    In previous Guile releases, the implementation of expressions like
199    @code{(eval (read port))} was deficient in that source properties
200    associated with the expression returned by the @code{read} would be lost
201    during the @code{eval}.  To provide a way of performing a read and
202    evaluation without losing source properties, @code{read-and-eval!} was
203    invented.
204    
205    In this Guile release, evaluation always preserves source property
206    information.  So @code{read-and-eval!} is now unnecessary.
207    
208    @deffn {Scheme Procedure} read-and-eval! [port]
209    @deffnx {C Function} scm_read_and_eval_x (port)
210    Read a form from @var{port} (standard input by default), and evaluate it
211    (memoizing it in the process) in the top-level environment.  If no data
212    is left to be read from @var{port}, an @code{end-of-file} error is
213    signalled.
214    @end deffn
215    
216    
217    @node Close All Ports
218    @section Closing All Ports Except Some @dots{}
219    
220    @deffn {Scheme Procedure} close-all-ports-except . ports
221    @deffnx {C Function} scm_close_all_ports_except (ports)
222    [DEPRECATED] Close all open file ports used by the interpreter
223    except for those supplied as arguments.  This procedure
224    was intended to be used before an exec call to close file descriptors
225    which are not needed in the new process.  However it has the
226    undesirable side effect of flushing buffers, so it's deprecated.
227    Use port-for-each instead.
228    @end deffn
229    
230    
231    @node C Module Reg
232    @section Old Method for Registering C Modules.
233    
234    ** Auto-loading of compiled-code modules is deprecated.
235    
236    Guile used to be able to automatically find and link a shared
237    library to satisfy requests for a module.  For example, the module
238    `(foo bar)' could be implemented by placing a shared library named
239    "foo/libbar.so" (or with a different extension) in a directory on the
240    load path of Guile.
241    
242    This has been found to be too tricky, and is no longer supported.  The
243    shared libraries are now called "extensions".  You should now write a
244    small Scheme file that calls `load-extension' to load the shared
245    library and initialize it explicitely.
246    
247    The shared libraries themselves should be installed in the usual
248    places for shared libraries, with names like "libguile-foo-bar".
249    
250    For example, place this into a file "foo/bar.scm"
251    
252        (define-module (foo bar))
253    
254        (load-extension "libguile-foo-bar" "foobar_init")
255    
256    
257    @node Removed Items
258    @section Previously Deprecated Items Now Removed
259    
260    tag
261    fseek
262    list*

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26