🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.transputer
Article #622

Re: occam

#622
From: tony
Date: Fri, 14 Aug 1992 15:17
131 lines
5544 bytes
Warren> Column counting is, the formatting is done elegantly in occam.  One space is not
Warren> enough indentation visually, three is too much when one has lots of indenting.

In your opinion that is - this smacks too much of Orwellian
overtones to me.  Why not let the programmer choose?

Ok, it provides a standard layout, but open things up and
let people decide over time what they want and they'll come
up with a good working convention (or conventions) for
layout.  I don't like having it enforced arbitrarily from
on-high.

Warren> Formatting a program in this way is good as one uses spacial relationships to indicate
Warren> the programs structure.

Not convinced.  Being forced into a particular layout
doesn't, for me anyway, feel nice.  I'd like to learn what a
good layout style is by getting it wrong, messy, learning
from others etc.  It's a more constructive learning
experience.

Warren> Formatting a language in this way is also good as one can use it to indicate
Warren> information to the compiler

I thought the purpose of abstraction (v.i.) was to make life
easier for the programmer, not for the compiler.  Write in
binary/hex octal if this is what you are worried about.

Warren> , which cuts out the need of lots of end, od, esac, }
Warren> and fi keywords.

But they do make block encapsulation easier to see on the
screen.

Warren> My experience has lead me to do things like this,

Warren>   {{{ 1 + 2*3 - 4.0
Warren>   ( 1.0(REAL32)  +  (2.0(REAL32) * 3.0(REAL32)))  -  4.0(REAL32)
Warren>   }}}

I.e. your comment is syntactic rather than semantic and you
are therefore repeating yourself, when you could have
expressed the equation directly as per the comment in the
first place.

Warren> By the way, the occam compiler (the one here at any
Warren> rate) constant folds the above to 3.0(REAL32).

I suspect (hope?) any decent compiler for any language would
try to do the same in this case.

Warren> Occam's approach to typing like this is hard on the fingers and brain sometimes, but
Warren> it does make look at what you want the machine to do.

I'd rather worry about the problem I am trying to solve than
worry about the machine.

Warren> No the above doesn't answer your point about the advantages, but others have,
Warren> here I have decided giving out experience and ideas is more advantageous.

Warren>   IF
Warren>     var1 < 1.0 (REAL32)
Warren>       var1, var2 := 2.0(REAL32), 2.0(REAL32)
Warren>     TRUE
Warren>       SKIP

Except there is a bug in multiple assignments for the
compiler we have here (TDS2, MEiKO) (or there was last time
I looked at the bug list :-)

Warren> Perhaps the multiple assignment isn't more readable, I don't think my personnel taste
Warren> prefers it, but its easier to type and were all lazy occasionally.

If your personal choice is offended, fine; this is the point
about being able to choose layout etc.  Multiple assignment
can be replaced by a SEQ of assignments; seems to me that
Will's Razor hasn't been used here!

Warren> Jan's comment about wanting

Warren> TRUE
Warren>   STOP

I think you meant SKIP

Warren> as the default is a common one.  I wanted it too until I was told why.  I think
Warren> it was to catch and stop sloppy programming (not that any of us do that, all of
Warren> our programs are bug free aren't they:-).  There might be a case the programmer
Warren> has overlooked.
  
This would seem to indicate the programmer hasn't been
thinking properly about the problem.  A warning from the
compiler would be friendlier.

>My objection is why?. Who needs a new editor?; I mean just how many 
>ways can you do a cut-and-paste operation!.

Warren> The important issue is that of abstraction.  Making a large thing managable by

But above you were worried about getting at the machine to
optimise what you were doing, rather than making life easier
for the programmer.  The current icarnation of the TDS and
occam2 in no way make software management easier (and as you
were talking about "experience", this is an opinion derived
from 7 years' use of occam).  Don't get me wrong, I'm not
stoning occam mercilessly, it's got a few good points, but I
think it needs to go a long way to be "real" (or is that
REAL32? :-)

Warren> humans.  Also as we get more experience at writing editors we get better at
Warren> making the c-n-p operations easier to use and more intuitive to the first time
Warren> user.

The TDS, so far as I can see, does not provide anything that
any other editor can do, and lacks *much* thatcI get it in
others (vi, emacs, etc).  As for folding making life easier,
it is just as easy to abuse the fold structure as it is to
write bulky code in any other editor.  It is also lacking
SCCS type manipulation by using a closed system and a
bizarre file format (binary source files?  I ask you...).

>I like to have more direct control over the files on my disk.
Warren> Yes, it needs to be better at actually deleting files.

This is mainly an artefact of the MEiKO port to handle a
multi-user system (I think).

Just my 2 groats worth...

tony
Technical Details
Message-ID: <46@pine.ukc.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!harrier.ukc.ac.uk!pine.ukc.ac.uk!arc1
References: <2490@news.cerf.net> <1462@eagle.ukc.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!harrier.ukc.ac.uk!pine.ukc.ac.uk!arc1
From: arc1@ukc.ac.uk (tony)
Newsgroups: comp.sys.transputer
Subject: Re: occam
Message-ID: <46@pine.ukc.ac.uk>
Date: 14 Aug 92 15:17:18 GMT
References: <2490@news.cerf.net> <1462@eagle.ukc.ac.uk>
Sender: arc1@ukc.ac.uk
Organization: Computing Laboratory, UKC
Lines: 131