n***@absamail.co.za
2006-03-22 15:25:03 UTC
For me, ETH-Sys3's gadgets with mouse-chording is THE killer-application;
ahead of Norton's-commander [well cloned to MC].
Since ETH's function is to get gradutes out the door, it's understandable
that similar [hence wasteful/irritating] code repeatedly [each student
must repeat the exercises] appears in all sources of eg. the family of
commands which do:
<CommandOn> <AtextOrfile>. eg.
AsciiCoder.CodeText *
AsciiCoder.CodeFiles ^
Backup.ReadFiles ^
Compiler.Compile @
UUDecoder.Decode ~
...etc.
Reading Compiler.Mod , we see:--
Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S);
globalOpt := ""; GetOptions(S, globalOpt);
IF (S.class = Texts.Char) & ((S.c = "*") OR (S.c = "@")) THEN
IF S.c = "*" THEN
t := Oberon.MarkedText(); pos := 0; frame := Oberon.MarkedFrame();
ELSE (* S.c = "@" *)
Oberon.GetSelection(t, pos, end, time); frame := NIL;
....
ELSIF ((S.class = Texts.Char) & (S.c = "^")) OR (S.class = Texts.Name) THEN
IF (S.c = "^") THEN ..........
---
I would be happy if this repeated, with each author's own flavour/format
could be factored out, to give some thing like:--
CONST (* factored-out module *)
MarkedViewer = "*"; ThatFile = "^"; StartOfSelctn = "@"; ...
....
CASE FirstArg OF (* in client module *)
MarkedViewer: CompileMarkedViewer
|ThatFile: CompileThatFile
|StartOfSelctn: CompileFromSelctnStart
.....
---
I'm reluctant to spend time analysing ooc, but a first look seemd to show
a nice 'formal' setup. Has ooc got a policy on the above issue: code
factoring ?
Another thing of S3 which I suspect is for the benefit of 'exercising' the
students is the heavy use of var-pars instead of a more functional style.
Ie. saving CPU cycles instead of programmers effort.
What is the policy of the existing ooc code ?
Thanks for any input.
== Chris Glur.
ahead of Norton's-commander [well cloned to MC].
Since ETH's function is to get gradutes out the door, it's understandable
that similar [hence wasteful/irritating] code repeatedly [each student
must repeat the exercises] appears in all sources of eg. the family of
commands which do:
<CommandOn> <AtextOrfile>. eg.
AsciiCoder.CodeText *
AsciiCoder.CodeFiles ^
Backup.ReadFiles ^
Compiler.Compile @
UUDecoder.Decode ~
...etc.
Reading Compiler.Mod , we see:--
Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S);
globalOpt := ""; GetOptions(S, globalOpt);
IF (S.class = Texts.Char) & ((S.c = "*") OR (S.c = "@")) THEN
IF S.c = "*" THEN
t := Oberon.MarkedText(); pos := 0; frame := Oberon.MarkedFrame();
ELSE (* S.c = "@" *)
Oberon.GetSelection(t, pos, end, time); frame := NIL;
....
ELSIF ((S.class = Texts.Char) & (S.c = "^")) OR (S.class = Texts.Name) THEN
IF (S.c = "^") THEN ..........
---
I would be happy if this repeated, with each author's own flavour/format
could be factored out, to give some thing like:--
CONST (* factored-out module *)
MarkedViewer = "*"; ThatFile = "^"; StartOfSelctn = "@"; ...
....
CASE FirstArg OF (* in client module *)
MarkedViewer: CompileMarkedViewer
|ThatFile: CompileThatFile
|StartOfSelctn: CompileFromSelctnStart
.....
---
I'm reluctant to spend time analysing ooc, but a first look seemd to show
a nice 'formal' setup. Has ooc got a policy on the above issue: code
factoring ?
Another thing of S3 which I suspect is for the benefit of 'exercising' the
students is the heavy use of var-pars instead of a more functional style.
Ie. saving CPU cycles instead of programmers effort.
What is the policy of the existing ooc code ?
Thanks for any input.
== Chris Glur.