Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Access the the second return value?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 66 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard James Panturis Giuly  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Richard James Panturis Giuly <n...@spam.com>
Date: 2000/06/28
Subject: Access the the second return value?
For some reason I can't find how to access the second return
value of a function like gethash. Could someone help me out?

(I hope I'm not bothering you people with all these questions.)

--
        ricky
        rgi...@surfsouth.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Friedrich Dominicus  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Friedrich Dominicus <fr...@q-software-solutions.com>
Date: 2000/06/28
Subject: Re: Access the the second return value?
Richard James Panturis Giuly <n...@spam.com> writes:

> For some reason I can't find how to access the second return
> value of a function like gethash. Could someone help me out?

> (I hope I'm not bothering you people with all these questions.)

example :  
CL-USER 5 : 1 > (setf ht (make-hash-table))
#<EQL Hash Table{0} 204EB5C4>

CL-USER 6 : 1 > (setf (gethash 1 ht) "one")
"one"

CL-USER 7 : 1 > (setf (gethash 2 ht) "two")
"two"

CL-USER 8 : 1 > (gethash 2 ht)
"two"
T

CL-USER 9 : 1 > (multiple-value-bind (item present?)
                    (gethash 2 ht)
                  (list item present?))
("two" T)

There are a bunch of other multiple-.... functions for different
purposes.

Regards
Friedrich

--
for e-mail reply remove all after .com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martti Halminen  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Martti Halminen <Martti.Halmi...@solibri.com>
Date: 2000/06/28
Subject: Re: Access the the second return value?
Richard James Panturis Giuly wrote:

> For some reason I can't find how to access the second return
> value of a function like gethash. Could someone help me out?

multiple-value-bind, multiple-value-call, multiple-value-setq
etc.

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Foley  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Paul Foley <mycr...@actrix.gen.nz>
Date: 2000/06/28
Subject: Re: Access the the second return value?
On 28 Jun 2000 10:43:21 +0200, Friedrich Dominicus wrote:

> CL-USER 9 : 1 > (multiple-value-bind (item present?)

Argh!  I am the only one that's bothered by this godawful Schemish use
of `?' in symbols for "predicate" functions/values?

--
Cogito ergo I'm right and you're wrong.               -- Blair Houghton

(setq reply-to
  (concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Bakhash  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: David Bakhash <ca...@alum.mit.edu>
Date: 2000/06/28
Subject: Re: Access the the second return value?
Richard James Panturis Giuly <n...@spam.com> writes:

> For some reason I can't find how to access the second return
> value of a function like gethash. Could someone help me out?

it's #'nth-value:

http://www.xanalys.com/software_tools/reference/HyperSpec/Body/mac_nt...

dave


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Friedrich Dominicus  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Friedrich Dominicus <fr...@q-software-solutions.com>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Paul Foley <mycr...@actrix.gen.nz> writes:
> On 28 Jun 2000 10:43:21 +0200, Friedrich Dominicus wrote:

> > CL-USER 9 : 1 > (multiple-value-bind (item present?)

> Argh!  I am the only one that's bothered by this godawful Schemish use
> of `?' in symbols for "predicate" functions/values?

matter of taste. I have to admit I like ! and ? more than in case one
I did not even know and what's or p or is it -p in the latter. But if
you feel unhappy with that read it as
presentp ;-)

Regard
Friedrich

--
for e-mail reply remove all after .com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Bradshaw  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Tim Bradshaw <t...@cley.com>
Date: 2000/06/28
Subject: Re: Access the the second return value?

* Martti Halminen wrote:
> multiple-value-bind, multiple-value-call, multiple-value-setq
> etc.

Also nth-value is very useful

--tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 2000/06/28
Subject: Re: Access the the second return value?
* Paul Foley <mycr...@actrix.gen.nz>
| Argh!  I am the only one that's bothered by this godawful Schemish
| use of `?' in symbols for "predicate" functions/values?

  No, but it's a very useful thing, this little question mark, as it
  communicates there's little hope of getting the person using it to
  stop thinking in Scheme when writing in Common Lisp.

#:Erik
--
  If this is not what you expected, please alter your expectations.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pierre R. Mai  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: p...@acm.org (Pierre R. Mai)
Date: 2000/06/28
Subject: Re: Access the the second return value?

Martti Halminen <Martti.Halmi...@solibri.com> writes:
> Richard James Panturis Giuly wrote:

> > For some reason I can't find how to access the second return
> > value of a function like gethash. Could someone help me out?

> multiple-value-bind, multiple-value-call, multiple-value-setq
> etc.

Or, in the unlikely event that you only need the second (and not the
first value), you can use nth-value, as in

(defun key-presentp (key hash)
  "Check whether the given key is present in the given hash table."
  (nth-value 1 (gethash key hash)))

Regs, Pierre.

--
Pierre Mai <p...@acm.org>         PGP and GPG keys at your nearest Keyserver
  "One smaller motivation which, in part, stems from altruism is Microsoft-
   bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Kullstam  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Johan Kullstam <kulls...@ne.mediaone.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Paul Foley <mycr...@actrix.gen.nz> writes:
> On 28 Jun 2000 10:43:21 +0200, Friedrich Dominicus wrote:

> > CL-USER 9 : 1 > (multiple-value-bind (item present?)

> Argh!  I am the only one that's bothered by this godawful Schemish use
> of `?' in symbols for "predicate" functions/values?

there's no accounting for taste.  i happen to like ? and ! over the
more traditional p and f.  just because this notation comes from
scheme doesn't necessarily make it bad.  it's only a style convention.

i do use p and f because it's hard to fight the tide of tradition.
macros for CLOS, for example, automatically define a -p instead of a ?
suffix.  lisp, being an old language, has many of these minor
traditionals which could have been better but live on for
historical reasons.

you may actually be the only one this bothered.

--
johan kullstam l72t00052


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 2000/06/28
Subject: Re: Access the the second return value?
* Johan Kullstam <kulls...@ne.mediaone.net>
| there's no accounting for taste.  i happen to like ? and ! over the
| more traditional p and f.

  f?  If this is what I think it is, namely a truly _perverted_
  Schemocentric world-view where Scheme's ridiculous set! is deemed
  the model for setf, there _is_ accounting for taste: Scheme is bad
  for young people's brains.

| just because this notation comes from scheme doesn't necessarily
| make it bad.

  No, not _necessarily_, but it doesn't help.  Everything good in
  Scheme is already adopted by every other language.  Being a
  minimalist language, that means whatever is left is just trash
  waiting for the last reference to go before it is collected and
  carted out.

| you may actually be the only one this bothered.

  Not so.

#:Erik
--
  If this is not what you expected, please alter your expectations.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Bakhash  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: David Bakhash <ca...@alum.mit.edu>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Johan Kullstam <kulls...@ne.mediaone.net> writes:
> you may actually be the only one this bothered.

well, if you wanna know, I'm bothered every time I see a ? or ! in a CL
program.  

dave


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Kullstam  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Johan Kullstam <kulls...@ne.mediaone.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Erik Naggum <e...@naggum.no> writes:
> * Johan Kullstam <kulls...@ne.mediaone.net>
> | there's no accounting for taste.  i happen to like ? and ! over the
> | more traditional p and f.

>   f?  If this is what I think it is,

not at all.  i just think that using the characters ? and ! instead of
p and f in common-lisp would be preferable [1].  i am not saying use
scheme's set!, i am saying we could just as well have spelled
common-lisp "setf" as "set!" [2].  it'd still *be* setf.  only the name
would be different.  on the other hand, it's not like spelling matters
much and it's certainly not worth the bother of changing now.  keeping
everything consistant is much more important.  i'm not agitating for
any changes, just pointing out that i don't find it all that annoying.

>   namely a truly _perverted_
>   Schemocentric world-view where Scheme's ridiculous set! is deemed
>   the model for setf, there _is_ accounting for taste: Scheme is bad
>   for young people's brains.

no need for fear and loathing time yet.  sorry i brought it up.

[1] just my opinion and i realize there's no accounting for taste.
    p and f are letters and whether to use "-p" or just slap a plain
    "p" on the end of a predicate is a (albeit very slight) annoyance.

[2] except for early keyboards back in '62 might not have had any "!"
    or perhaps it was used for some system function, or maybe someone
    else just had a different set of tastes.

--
johan kullstam l72t00052


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 2000/06/28
Subject: Re: Access the the second return value?
* Johan Kullstam <kulls...@ne.mediaone.net>
| there's no accounting for taste.  i happen to like ? and ! over the
| more traditional p and f.

* Erik Naggum
| f?  If this is what I think it is,

* Johan Kullstam <kulls...@ne.mediaone.net>
| not at all.

  But then you proceed to tell me it is exactly what I think it is: A
  serious confusion of Scheme's childishly amusing use of bang in some
  operators like set!, with Common Lisp's very generalized "set
  field", which originally comes from CLOS, I believe.

| i am not saying use scheme's set!, i am saying we could just as well
| have spelled common-lisp "setf" as "set!" [2].

  No, we couldn't.  ! is overcute, childish, silly, even ridiculous,
  the sort of immature reminders that C programmers who build complex
  prefix systems ["Hungarian" noation] in their variable names use
  because they lose track of type information.  ? at least has _some_
  merit, but its association with ! is not to its credit.

| on the other hand, it's not like spelling matters much and it's
| certainly not worth the bother of changing now.

  Syntax and spelling matters very much.

| no need for fear and loathing time yet.

  OK.  :)

| [1] just my opinion and i realize there's no accounting for taste.
|     p and f are letters and whether to use "-p" or just slap a plain
|     "p" on the end of a predicate is a (albeit very slight) annoyance.

  But the rule is quite simple: If the symbol has a - already, add -p
  at the end, and if not, just add p.

| [2] except for early keyboards back in '62 might not have had any "!"
|     or perhaps it was used for some system function, or maybe someone
|     else just had a different set of tastes.

  Or perhaps it's because it looks dumb.  E.g., suppose I think we
  need a special syntax for conditions, like ending in interrobang.
  Some would think it cute, some would retch and barf in my general
  direction, and hoardes of educators everywhere would think it just
  as bright as the Hungarian notation and destroy the aesthetic sense
  of _another_ generation of programmers, as if Perl and C++ hadn't
  done away with the concept of aesthetics in the first place.

#:Erik
--
  If this is not what you expected, please alter your expectations.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Marshall  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Joe Marshall <jmarsh...@alum.mit.edu>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Erik Naggum <e...@naggum.no> writes:
> | i am not saying use scheme's set!, i am saying we could just as well
> | have spelled common-lisp "setf" as "set!" [2].

>   No, we couldn't.  ! is overcute, childish, silly, even ridiculous,
>   the sort of immature reminders that C programmers who build complex
>   prefix systems ["Hungarian" noation] in their variable names use
>   because they lose track of type information.  ? at least has _some_
>   merit, but its association with ! is not to its credit.

`Hungarian' notation loses on two counts:  not only does it encodes
type information in variables (strong typing advocates may not object
to this), it also encodes the concrete type rather than the abstract
type, thus cluttering the variable name with irrelevant noise.
Knowing that the variable `user_name' is implemented as a `pointer to
a zero-terminated string of two-byte characters' is pointless trivia.

Scheme's `!' notation does not encode a type, but indicates that the
function named may have side effects.  The absence of the `!' is a
reasonable indication that you are dealing with a `pure' function.  If
you believe that there is some merit in writing purely functional
code, it is convenient to know if a particular function should be
avoided.

The `?' notation, however, *does* encode type information, although
not the same sort of information that `Hungarian' notation encodes.

Common Lisp does not eschew side effects as much as Scheme, so the `!'
notation may be of less utility.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
R Matthew Emerson  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: R Matthew Emerson <r...@grc.nasa.gov>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Johan Kullstam <kulls...@ne.mediaone.net> writes:
> i just think that using the characters ? and ! instead of
> p and f in common-lisp would be preferable [1].  i am not saying use
> scheme's set!, i am saying we could just as well have spelled
> common-lisp "setf" as "set!" [2].  it'd still *be* setf.  only the name
> would be different.

I think you're misunderstanding the '!' convention as used in Scheme
and Dylan.  I believe that the bang suffix is used to denote mutators.
CL's "nappend" would be "append!";  "nreverse" would be "reverse!";
"sort" would be "sort!", and so forth.

Generalized variable access is something else again.

> on the other hand, it's not like spelling matters much and it's
> certainly not worth the bother of changing now.  keeping everything
> consistant is much more important.

Well, CL isn't 100% consistent in any case---why isn't sort called
nsort, for example?  I think the point is that it's wise to stick to
the traditional idiom/style/mode of the language.

--
Matt Emerson <r...@grc.nasa.gov>
Never get involved in a land war in Asia.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Kullstam  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Johan Kullstam <kulls...@ne.mediaone.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Erik Naggum <e...@naggum.no> writes:
> | [1] just my opinion and i realize there's no accounting for taste.
> |     p and f are letters and whether to use "-p" or just slap a plain
> |     "p" on the end of a predicate is a (albeit very slight) annoyance.

>   But the rule is quite simple: If the symbol has a - already, add -p
>   at the end, and if not, just add p.

except for CLOS which affixes -p no matter what.  i do think the CLOS
behavior is correct.  having defclass parse the symbol name string and
use -p or p depending on presence of - or not seems to be a bit more
fanciness than is warranted.

i like a language to support artificial intelligence, not to be an
artificial intelligence in its own right.  ;-)  reminds me of DWIM.

> | [2] except for early keyboards back in '62 might not have had any "!"
> |     or perhaps it was used for some system function, or maybe someone
> |     else just had a different set of tastes.

>   Or perhaps it's because it looks dumb.

which is your (and probably the majority's) opinion.  it's also
somewhat of what you are used to.  changes are usually unwelcome.
gratuitous change more so.

--
johan kullstam l72t00052


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Lijnzaad  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Philip Lijnzaad <lijnz...@ebi.ac.uk>
Date: 2000/06/28
Subject: Re: Access the the second return value?

> I think you're misunderstanding the '!' convention as used in Scheme
> and Dylan.  I believe that the bang suffix is used to denote mutators.
> CL's "nappend" would be "append!";  "nreverse" would be "reverse!";
> "sort" would be "sort!", and so forth.

exactly: FORTH. Did this '!'-convention perhaps come from Forth, where it's
usually pronounced as 'store' (as in: "42 the_answer !", which puts 42 into
the variable the_answer)? Or is it is more likely to have come from mutators
being indicative of imperative (as in "Do this! Do that!") programming?

(I must say though, that NREVERSE doesn't receive much of an aesthetics or
clarity price either)

                                                                      Philip
--
Ban GM foods! Long live the Mesolithicum, pesticides and starvation
--------------------------------------------------------------------------- --
Philip Lijnzaad, lijnz...@ebi.ac.uk \ European Bioinformatics Institute,rm A2-24
+44 (0)1223 49 4639                 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax)           \ Cambridgeshire CB10 1SD,  GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC  50 3D 1F 64 40 75 FB 53


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johan Kullstam  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Johan Kullstam <kulls...@ne.mediaone.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?
R Matthew Emerson <r...@grc.nasa.gov> writes:

> Johan Kullstam <kulls...@ne.mediaone.net> writes:

> > i just think that using the characters ? and ! instead of
> > p and f in common-lisp would be preferable [1].  i am not saying use
> > scheme's set!, i am saying we could just as well have spelled
> > common-lisp "setf" as "set!" [2].  it'd still *be* setf.  only the name
> > would be different.

> I think you're misunderstanding the '!' convention as used in Scheme
> and Dylan.

i think i'm intentionally not caring what the "!" convention means in
scheme or dylan.  some lisp operations end in an "f", e.g., SETF, INCF.
one could have spelled it SET! and INC! respectively.  it seems most
people here prefer the traditional way.  so be it.

> I believe that the bang suffix is used to denote mutators.
> CL's "nappend" would be "append!";  "nreverse" would be "reverse!";
> "sort" would be "sort!", and so forth.
> Generalized variable access is something else again.

hmm.  i have always said that there are two kinds of destruction.  the
one that might wantonly chew up its args like NREVERSE and the kind
that must alter an argument in a particular well-defined way like
INCF.

> > on the other hand, it's not like spelling matters much and it's
> > certainly not worth the bother of changing now.  keeping everything
> > consistant is much more important.

> Well, CL isn't 100% consistent in any case---why isn't sort called
> nsort, for example?  I think the point is that it's wise to stick to
> the traditional idiom/style/mode of the language.

sure, and there's the REMOVE and DELETE pair.  you might think DELETE
would be spelled NREMOVE.

--
johan kullstam l72t00052


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
R Matthew Emerson  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: R Matthew Emerson <r...@grc.nasa.gov>
Date: 2000/06/28
Subject: Re: Access the the second return value?
R Matthew Emerson <r...@grc.nasa.gov> writes:

> I think you're misunderstanding the '!' convention as used in Scheme
> and Dylan.  I believe that the bang suffix is used to denote mutators.
> CL's "nappend" would be "append!";  "nreverse" would be "reverse!";
> "sort" would be "sort!", and so forth.

err, there isn't actually a function in CL called nappend; nconc
is the destructive version of append.

--
Matt Emerson <r...@grc.nasa.gov>
Wizard shot the food.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Bradshaw  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Tim Bradshaw <t...@cley.com>
Date: 2000/06/28
Subject: Re: Access the the second return value?

* Johan Kullstam wrote:
> except for CLOS which affixes -p no matter what.  i do think the CLOS
> behavior is correct.  having defclass parse the symbol name string and
> use -p or p depending on presence of - or not seems to be a bit more
> fanciness than is warranted.

I think you mean DEFSTRUCT, not DEFCLASS (which doesn't define a
predicate)

--tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vsync  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: vsync <vs...@quadium.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Paul Foley <mycr...@actrix.gen.nz> writes:
> [I'm not aware of any tradition of using "f" in Lisp where Scheme uses
> "!".  SETF is a fairly recent addition to Lisp, and SETQ was
> originally a minor variation on SET.]

I thought there was somewhat of a tradition of using "n-" for
destructive operations (nconc etc...)  Isn't that what "!" is for in
Scheme?

--
vsync
http://quadium.net/ - last updated Fri Jun 23 23:28:05 MDT 2000
Orjner.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vsync  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: vsync <vs...@quadium.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Paul Foley <mycr...@actrix.gen.nz> writes:
> Argh!  I am the only one that's bothered by this godawful Schemish use
> of `?' in symbols for "predicate" functions/values?

I don't know, but I despise the use of "FIRST" and "SECOND" in Winston
and Horn.  I _like_ using CAR, CDR, and the like, because it actually
shows the operations taking place, and it's intuitive that CADDR takes
a little more time than CAR.  Whenever anything is made "friendly",
there's lossage involved, and painful ignorance on the way.

--
vsync
http://quadium.net/ - last updated Fri Jun 23 23:28:05 MDT 2000
Orjner.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vsync  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: vsync <vs...@quadium.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Joe Marshall <jmarsh...@alum.mit.edu> writes:
> to this), it also encodes the concrete type rather than the abstract
> type, thus cluttering the variable name with irrelevant noise.
> Knowing that the variable `user_name' is implemented as a `pointer to
> a zero-terminated string of two-byte characters' is pointless trivia.

In my Java work especially, I write code that operates on, say, a
LinkedList.  I may decide to abstract it more to allow any List, or
restrict it to use MySpecialListDuJour.  Why anyone would want to
scatter possibly volatile information throughout their code and make
such changes more difficult is beyond me.

--
vsync
http://quadium.net/ - last updated Fri Jun 23 23:28:05 MDT 2000
Orjner.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vsync  
View profile  
 More options Jun 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: vsync <vs...@quadium.net>
Date: 2000/06/28
Subject: Re: Access the the second return value?

Philip Lijnzaad <lijnz...@ebi.ac.uk> writes:
> exactly: FORTH. Did this '!'-convention perhaps come from Forth, where it's
> usually pronounced as 'store' (as in: "42 the_answer !", which puts 42 into
> the variable the_answer)? Or is it is more likely to have come from mutators
> being indicative of imperative (as in "Do this! Do that!") programming?

Or maybe as a warning to the more forgetful programmers.  ("Look out!
This may eat stuff!")

--
vsync
http://quadium.net/ - last updated Fri Jun 23 23:28:05 MDT 2000
Orjner.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 66   Newer >
« Back to Discussions « Newer topic     Older topic »