473,437 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

OMG Lightweight Log

Has anyone implemented the OMG lightweight log spec into a c++
application?
#! 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.
[Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

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

Backtrace:
0: (C::%ODD-KEYWORD-ARGUMENTS-ERROR)
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.

Thanks
--jeff cunningham
Jul 23 '05 #1
0 1567

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

Similar topics

0
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...
2
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...
1
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...
3
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,...
0
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....
2
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...
2
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...
11
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....
2
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.