472,358 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,358 software developers and data experts.

OMG Lightweight Log

Has anyone implemented the OMG lightweight log spec into a c++
#! rnews 1946
Xref: xyzzy comp.lang.lisp:150483
Newsgroups: comp.lang.lisp
Path: xyzzy!nntp
From: Jeffrey Cunningham <je******************@boeing.com>
Subject: PCL question about using &rest and &key parameters together
X-Nntp-Posting-Host: medea.sea.boeing.com
Content-Type: text/plain; charset=ISO-8859-1
Message-ID: <pa****************************@boeing.com>
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Sender: nn**@news.boeing.com (Boeing NNTP News Access)
Content-Transfer-Encoding: 8bit
Organization: The Boeing Company
Mime-Version: 1.0
Date: Tue, 17 May 2005 18:19:25 GMT

I was reading in Seibel's PCL the following:

You can safely combine &rest and &key parameters, but the behavior may be
a bit surprising initially. Normally the presence of either &rest or &key
in a parameter list causes all the values remaining after the required and
&optional parameters have been filled in to be processed in a particular
way--either gathered into a list for a &rest parameter or assigned to the
appropriate &key parameters based on the keywords. If both &rest and &key
appear in a parameter list, then both things happen--all the remaining
values, which include the keywords themselves, are gathered into a list
that's bound to the &rest parameter, and the appropriate values are also
bound to the &key parameters.

So I tried the following:

(defun foo (a &rest rest &key b c)
(list a rest b c))

(foo 1 2 :b 3 :c 4)

When I run it from slime, it bombs with the following error message:

Function called with odd number of keyword arguments.

0: [ABORT] Abort handling SLIME request. 1: [ABORT] Return to Top-Level.

1: (NIL 1 (2 :B 3 :C 4) 5)[:OPTIONAL] 2: (SWANK::EVAL-REGION "(foo 1 2
:b 3 :c 4)

Any idea why this doesn't work as expected? I'm using CMUCL.

--jeff cunningham
Jul 23 '05 #1
0 1515

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Jeremy Hylton | last post by:
Lightweight Languages 2004 (LL4) http://ll4.csail.mit.edu/ Dec. 4, 2004 MIT, Cambridge MA Call for Presentations LL4 will be an intense, exciting, one-day forum bringing together the best...
by: build | last post by:
G'day all, I want to load comma sep text files and display it in a grid. I'd like something simple and lightweight. Don't need to edit it in grid, I could do that in textboxes if required. tia...
by: Guinness Mann | last post by:
Greetings, I'm working in VS2003.NET using C#. I need to download a few rows from an SQL Server database table and then be able to page back and forth through them. I don't need to make any...
by: Ramza Brown | last post by:
I am sorry if I think like this, but sometimes(keyword sometimes) I like distributing my interpreters. Anyway, I found the absolute minimum libraries needed for Python to work with Win32. And,...
by: Andrew Fedoniouk | last post by:
Announce: Lightweight HTML forms layout manager and browser component. http://HtmLayout.com Latest version of HtmLayoutSDK contains sources of wrapper for .NET (C#) Andrew Fedoniouk....
by: MS News | last post by:
Hello When I spawn a lightweight process on a new Thread and return immediately to the Client what happens if the lightweight process takes an hour to finish? Under what context is the process...
by: Martin Halle | last post by:
Dear all, I'm using XML in a project. This is a very simple and small file that follows an even simpler XSD schema. I've found a lightweight library (TinyXML) to read and access the contents of...
by: garyusenet | last post by:
I have 'cli via c# on order', and in the mean time am reading 'Pro C# 2005 and the .NET platform' (Andrew Troelson). I'm just reading about the 'five types defined in the CTS'. Specifically Struct....
by: metaperl | last post by:
I find it arduous to type dictionary and also feel that any data I create for a program deserves to have its operations tied to it. As a result, I often create lots of lightweight classes. Here's a...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.