[Oberon] CAP and recursion

easlab at absamail.co.za easlab at absamail.co.za
Fri May 26 06:29:34 CEST 2006


> c> what language is this ?
> 
Peter wrote:
> Oberon, directly out of PC Native 05.01.2003.
> 
I wrongly speculated that the code which you listed,
was some separate dialect embedded in the compiler.
Like Layla is embedded in Oberon.

This reconfirms a pet topic of mine: the problem of 
chaos/confusion from language/dialect proliferation.
Eg. lately there seems to be multiple ways of representing
`char(') `.   Apparently mime handles it in email ?
Because my simple N-O email-client doesn't do mime, 
[using unix oberon will solve that ?], I get many strange 
chars, including eg. "=3D"  for `char(=) `.

Of course I know about the " ^ pointer dereferencing" 
concept, but I thought [wrongly] that this was another of 
the C-like potentially dangerous facilities removed for 
Oberon simplification.

Fortunately [which is nowhere the situation with my 
linux/C  system] I was easily able to search/confirm:
<Partition>NoDocm >  *ort* > OberonReport.html > 
    Oberon Language Report.
Which confirmed that "^"  IS part of the syntax.

Previously I made a similar mistake, in [absurdly] concluding 
that Oberon couldn't do recursion, since test code, where I
omitted the empty arg-list-brackets, eg. "funct()", [no
brackets requires in pascal for no args - as I remember?],
gave error mesgs. suggesting [to me] that recursion capabilty
had been removed for simplification.

My point being, that a tool [perhaps even if only heuristic,
like [linux] vim's colouring of key-words & structures,
or Bablefish's assistance attempts] the help QUICKLY
separate the syntax of the many, sometimes often closely
related, languages, would be very useful.
And I speculate that it could be extented towards a
[type of] syntax-editor; for any/all of the languages.

Examples of great N-O tools which help navigate potential
confusion are Watson & Columbus ?

John Stout wrote:
> This is NOT a recursive definition. It would only be a recursive definition
> if the procedure within which it is called is called CAP and had the same
> signature, i.e., CAP(CHAR):CHAR.

This further confirms my confusion.  Does the familiar java
concept of "compiler selecting the target proc. based also
on matching 'arg-signature' - apparently needed for 
polymorphism, also apply to oberon ?   Ie. the 2 calls:
Do(4, dogs) ; Do(4, cats) would call 2 different 
proc-implimentations, based on the 2 different types:
dogs  & cats; and hence signature of the args:(4, dogs),
(4, cats).

Of couse we can't avoid being influenced [and confused] by
the other 'strange' languages  - a type of globalisation.
As previously noted, we should seek potential advantages,
like riding on the back of linux & it's tens of thousands of
contributors, eg. with linux-oberon ;-).

Peter wrote:
> I'll guess that load (x); puts the character in 
> a register in the cpu.  Would be interesting to 
> understand how MakeCon and Gen3 work to upcase a 
> character.

Complier writing is a whole science in itself.
Do you really want to go there ?
If the brilliantly optimised compiler is 10 times faster, and my
previous complilation of 100 mSec is reduced to 10 mSec,
then you've saved me 90 mSecs.

A [even if only heuristic initially - which could be refined
over time] tool to help 'translate' "funny N-O [set based]
asm-language/syntax" to a more intuitive syntax, would be
more valuable.

Yes, ETH's function is to do bleeding-edge research, but we
outside contributors should perhaps try to solve the problem,
dating back to the previous millenium, that even now with 
new releases, if you manually transfer [ie. human read/write] 
a URL containing the underscore char, you will fail !

Thanks,

== Chris Glur.





More information about the Oberon mailing list