Code Select
(define-with-keys (together a (b nil)) (list a b c d))
(together 'a 'b 'c 1 'd 2) ; ==> (a b 1 2)
Just right!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
;; Common Lisp example
(defun keylist (a &key x y z)
(list a x y z))
(defun )
(keylist 1 :z 5 :y 3) => (1 NIL 3 5)
(defun optionallist (a &optional (x 5)) (list a x ))
(optionallist 6)
(define (foreign_plus x y z)
(ffi:call-function (ffi:generate-arguments x y z)))
(define (foreign_plus x y z)
(dispatcher x y z))
void dispatcher (args)
{
func = args(1);
result = func_invoke (func, rest (args)); /* func_invoke has type checking */
pushback_returnvalue (result);
}
data = load_metadata(L_metadata);
lib = load_lib (L);
while ((current = next_namespace_info (data))) {
eval ("contexts...");
}
while ((current = next_type_info(data))) {
eval ("define class...");
}
while ((current = next_function_info(data))) {
push_func(function_name(current), dispatcher)
}
Do you mean that "the first one" is the linking of C procedures to newLISP (like the primitives, but users could write them)? I think that's what you meant but I'm not entirely sure.Quote from: "rickyboy"
This would mean, at least at a low level, that you'd have to re-build newLISP (if C procedures are statically linked), or re-build a dynamic link library that the already-built newLISP already references.Quote from: "rickyboy"
[/quote]I gather from your description that the "module system" you imagine would be designed with a newLISP substrate in mind (similar to the one you did in Common Lisp). But what sort of advantages do you see with the "module system" over using the currentQuote from: "rickyboy"import"system" ("the last thing")? That is, is there something disadvantageous or somehow less desirable about using import? Also, would you reveal any more details on the design of the "module system" to give us an idea upon which to evaluate any entailed advantages to using such a system over import? I am very curious, and I think the answer to these types of questions will help Lutz in weighing in on this issue.