473,549 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.c om>
Subject: PCL question about using &rest and &key parameters together
X-Nntp-Posting-Host: medea.sea.boein g.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.boein g.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 1581

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 programming language implementors and researchers, from both academia and industry, to exchange ideas and information, to challenge
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 build
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 changes nor post any updates. In the past I've downloaded the rows using a datareader, copied the fields for each row into a structure and then...
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, I included FLTK for the GUI toolkit. Sorry, but wxPython didn't fit my <30MB requirement. You can basically download it and find out what...
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. http://terra-informatica.org
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 running Is it running under the current Session. How do I insure that It will run until it is completed Please point me to an artical
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 the XML file in C++. Now I'm looking for something similar to validate a given XML file agains a XSD schema. This library should: - be lightweight...
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. Now Troelson described the struct type as 'a lightweight class type having value based semantics'. Looking at his example I cant see any...
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 small example: vlc = '/Applications/VLC.app/Contents/MacOS/VLC' class song(object): def __init__(self, title, url):
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.