🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6064

Expression Based Language

#6064
From: Dan Pierson
Date: Wed, 28 Dec 1988 16:32
34 lines
1857 bytes
In article <9282@ihlpb.ATT.COM>, nevin1@ihlpb (Liber) writes:
>This really has nothing to do with ":=" vs "=".  C is an
>expression-based language; Pascal is not (by expression-based I mean
>that every operator returns a value that can be used as one of the
>parameters for another operator).

OK, you get the grumble instead of Peter :-)

Since you're defining your own term, I can't flatly say you're wrong,
BUT this definition of "expression based" contradicts every other
definition I'm familiar with.  C and Pascal are both statement based
languages, however C has a larger set of legal expressions.  BLISS and
Lisp are both expression based languages, I.E. everything is an
expression and returns a value.  

If C was an expression based language, the ?: expression would be
totally redundant with a normal if statement (of course it would
still be more compact).  If C was an expression based language the
following would be legal:

   foo = switch (bar) {
    	    case 'a': ...
	    case 'b': ...
	    default: ...
	 };

This is not fantasy, the equivalent expressions exist and are useful
in BLISS and Lisp.
-- 
                                            dan

In real life: Dan Pierson, Encore Computer Corporation, Research
UUCP: {talcott,linus,necis,decvax}!encore!pierson
Internet: pierson@multimax.encore.com
Technical Details
Message-ID: <4505@xenna.Encore.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bu-cs!encore!pierson@mist
References: <3300001@uxg.cso.uiuc.edu> <3290002@hpctdls.HP.COM> <9282@ihlpb.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bu-cs!encore!pierson@mist
From: pierson@mist (Dan Pierson)
Newsgroups: comp.lang.misc
Subject: Expression Based Language
Summary: C isn't expression based
Message-ID: <4505@xenna.Encore.COM>
Date: 28 Dec 88 16:32:49 GMT
References: <3300001@uxg.cso.uiuc.edu> <3290002@hpctdls.HP.COM> <9282@ihlpb.ATT.COM>
Sender: news@Encore.COM
Reply-To: pierson@mist (Dan Pierson)
Organization: Encore Computer Corp
Lines: 34
In-reply-to: nevin1@ihlpb.ATT.COM (Liber)