🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6755

Re: Anyone want to design a language?

#6755
From: Freek Wiedijk
Date: Tue, 20 Feb 1990 13:27
49 lines
1935 bytes
In article <111355@ti-csl.csc.ti.com> gateley@m2.csc.ti.com (John Gateley)
writes:
>In article <8475@wpi.wpi.edu> jhallen@wpi.wpi.edu (Joseph H Allen) writes:
><(3)	Block structure indicated by indentation level:
><...
>Now, just take it a little further: get rid of all infix notation,
>and let "blocks" be denoted by ( and ) and you get:
>  ...
>and you have achieved a truly simple easy to use syntax where you
>dont have to worry about indentation (the editor does it for you),
>and programs which manipulate source code are much much easier to
>write.

Ehrm, no, I don't like this, because it is too verbose:

% cat foo.foo
while a!=b
	int q
	q=z*5
	r+=foo(q)
% cat foo.sch
(begin
  (while (!= a b)
    (let ((q integer))
      (= q (* z 5))
      (+= r (foo q)))))
% wc -c foo.*
      36 foo.foo
      92 foo.sch
     128 total
% bc
scale=2
92/36
2.55

Your solution has two-and-a-half times as many characters!  In my
opinion the main advantage of C with respect to Pascal, is that C
enables you to write "int" where Pascal forces you to say "integer" :-)

Also, I don't like this amount of parentheses:

      (+= r (foo q)))))
                  ^^^^^

I know that you can let the editor handle it, but it still confuses me.

--
Freek "the Pistol Major" Wiedijk                  Path: uunet!fwi.uva.nl!freek
#P:+/ = #+/P?*+/ = i<<*+/P?*+/ = +/i<<**P?*+/ = +/(i<<*P?)*+/ = +/+/(i<<*P?)**
Technical Details
Message-ID: <447@fwi.uva.nl>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!hp4nl!fwi.uva.nl!betty!freek
References: <22569:05:10:24@stealth.acf.nyu.edu> <8475@wpi.wpi.edu> <111355@ti-csl.csc.ti.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!hp4nl!fwi.uva.nl!betty!freek
From: freek@fwi.uva.nl (Freek Wiedijk)
Newsgroups: comp.lang.misc
Subject: Re: Anyone want to design a language?
Message-ID: <447@fwi.uva.nl>
Date: 20 Feb 90 13:27:07 GMT
References: <22569:05:10:24@stealth.acf.nyu.edu> <8475@wpi.wpi.edu> <111355@ti-csl.csc.ti.com>
Sender: news@fwi.uva.nl
Reply-To: freek@fwi.uva.nl (Freek Wiedijk)
Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam
Lines: 49