[comp.lang.pascal] No Obfuscations yet.

amull@Morgan.COM (Andrew P. Mullhaupt) (10/25/89)

Well, I guess nobody knows of any obfuscations worth posting in Pascal. So
far, I got one suggestion (which could be pretty opaque, but not very terse,
in my opinion) which is along the lines of:

type  real = integer;

var writeln : real;

and so on, using the redifinability of identifiers (not keywords, I think)
in Pascal. If put in different scopes, (and hiding each other on the way),
you could get something pretty hard to read, but not (in my opinion) anything
on the order of Obfuscated C. This is more or less as I expected, and for me
this more or less closes the issue.

So since nobody wants to talk about Obfuscation, what about interest in a
more recent standard? In particular; do Pascal programmers want to standardize
some widespread extensions to the language?

I think we ought to standardize:

1. The Unit construction for separate compilation. (I like the ones found in
   Turbo or Microsoft Pascal better than those in Sun pascal, for example.)

2. Function and procedure types, (again as found in most of your PC Pascals).

3. What about some kind of extensible arrays? Are conformant arrays what we
   want or should we go for something different?

4. Objects and methods as in Object Pascal. Are these Pascal? Are they good?
   (I don't know, I'm just asking...)

What do other people think?

Later,
Andrew Mullhaupt

art@bu-cs.BU.EDU (Al Thompson) (10/27/89)

In article <467@e-street.Morgan.COM> amull@Morgan.COM (Andrew P. Mullhaupt) writes:
>
>So since nobody wants to talk about Obfuscation, what about interest in a
>more recent standard? In particular; do Pascal programmers want to standardize
>some widespread extensions to the language?

There is a new standard for Extended Pascal that should be out soon.  This
group is read by members of the Joint Pascal Standard Committee (X3/J9).
Perhaps one of them would be kind enough to enlighten us as to the current
state of affairs.

>
>I think we ought to standardize:
>
>1. The Unit construction for separate compilation. (I like the ones found in
>   Turbo or Microsoft Pascal better than those in Sun pascal, for example.)
>
>2. Function and procedure types, (again as found in most of your PC Pascals).
>
>3. What about some kind of extensible arrays? Are conformant arrays what we
>   want or should we go for something different?

These items are all covered in the new proposed standard.

>
>4. Objects and methods as in Object Pascal. Are these Pascal? Are they good?
>   (I don't know, I'm just asking...)

This should be possible in the context of the new Standard, provided some
additional constructs are defined.  These constructs are necessarily
included in another language definition, in spirit of a structure
definition language as proposed by DeRemer and Kron in "Programming in the
Large Versus Programming in the Small".  The article appeared in IEEE
Trans. Softw. Eng. in 1976.

schwartz@psuvax1.cs.psu.edu (Scott Schwartz) (10/27/89)

Andrew Mullhaupt writes:
| I think we ought to standardize:
| 1. The Unit construction for separate compilation. (I like the ones found in
|    Turbo or Microsoft Pascal better than those in Sun pascal, for example.)
| 2. Function and procedure types, (again as found in most of your PC Pascals).
| 3. What about some kind of extensible arrays? Are conformant arrays what we
|    want or should we go for something different?
| 4. Objects and methods as in Object Pascal. Are these Pascal? Are they good?
|    (I don't know, I'm just asking...)
| What do other people think?

I think you are drifting away from standardising existing practice
into the realm of tacking on new features that catch your fancy.  Just
like C++, in fact.  Let pascal be pascal, and use something else if
you want something else.

Go read "Object Oriented Software Construction" by Bertrand Meyer to
see what a modern language looks like.  He designed Eiffel to be clean
and complete, and not built out of ad-hoc experimental extensions.
Very much in the spirit of pascal as conceived by Wirth.
--
Scott Schwartz		<schwartz@shire.cs.psu.edu>
/bin/hc hits! -more- You cannot escape from the large mimmic!

diamond@csl.sony.co.jp (Norman Diamond) (10/27/89)

In article <467@e-street.Morgan.COM> amull@Morgan.COM (Andrew P. Mullhaupt) writes:

>So since nobody wants to talk about Obfuscation, what about interest in a
>more recent standard? In particular; do Pascal programmers want to standardize
>some widespread extensions to the language?

Yes, and it has been done.  Demand one from your vendor.

>I think we ought to standardize:
>
>1. The Unit construction for separate compilation.

This is called "Module."

>2. Function and procedure types, (again as found in most of your PC Pascals).

Unfortunately this was not done.

>3. What about some kind of extensible arrays? Are conformant arrays what we
>   want or should we go for something different?

We went for something a lot more powerful, called Schemata.  Varying-
length strings appear as a result of schemata, as well.

>4. Objects and methods as in Object Pascal. Are these Pascal? Are they good?

This was not done.  Anyone who wants it done, (anyone who wants it done
right, that is), please offer me a job.

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work)
  Should the preceding opinions be caught or     |  James Bond asked his
  killed, the sender will disavow all knowledge  |  ATT rep for a source
  of their activities or whereabouts.            |  licence to "kill".

gateley@m2.csc.ti.com (John Gateley) (10/27/89)

In article <467@e-street.Morgan.COM> amull@Morgan.COM (Andrew P. Mullhaupt) writes:
>Well, I guess nobody knows of any obfuscations worth posting in Pascal.

Here is one: though it is an obfuscation in any language:

Program zz1

function zz2 (x, y, z: integer) : integer;
begin
  if y >= x then
    zz2 := z
  else
    zz2 := zz2(zz2(x-1,y,z),
               zz2(y-1,z,x),
               zz2(z-1,x,y))

end;

begin
...
end.

Please forgive any syntactic errors: I am not a pascal programmer.

John
gateley@m2.csc.ti.com