Lazarus

Miscellaneous => Other => Topic started by: valdir.marcos on December 16, 2019, 02:48:56 pm

Title: Modula, Oberon or Ada
Post by: valdir.marcos on December 16, 2019, 02:48:56 pm
But it's the way it is. This project is developed by users in their free time. People follow their interests (e.g. Florian improving the optimization, Jonas implementing the LLVM backend, me playing around in the parser).
And me being a pain in the collective backside of the core developers for the last 15 years or so :-)
At least since 06/02/02:
https://groups.google.com/forum/#!topic/comp.lang.modula2/DmRsV52YLb8
or is this the recruitment ? :-)
Afaik we came onto c.l.m2 about the same time (1994-1995 ?), and you might have submitted bugs/comments to my xtdlib library. So that would make it 25 years already :-)
Modula-2 product hits 400 thousand copy mark
https://groups.google.com/forum/#!topic/comp.lang.modula2/DmRsV52YLb8

For those who have already used Modula, Oberon or Ada.
Do those programming languages have any interesting features that Free Pascal currently doesn't?
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 16, 2019, 03:06:51 pm
For those who have already used Modula, Oberon or Ada.
Do those programming languages have any interesting features that Free Pascal currently doesn't?

From memory, Modula2 was basically an incompatible continuation of Pascal, and had


But above all I really missed a decent way of handling strings. M2 string handling was too manual for my taste. I changed to FPC in 1998, but kept maintaining the old codebases till 2001-2003, when I move to win2000, first at work, later at home, and the dos binaries started very slow under windows 2000, so I ported the code to FPC.

Oberon was a minimalistic OOP follow up to Modula2, and IMHO too limited to function.

Ada's story is different and more distinct from the real Wirthian languages.  Best read up in wikipedia or so.
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 16, 2019, 03:20:43 pm
For those who have already used Modula, Oberon or Ada.
Do those programming languages have any interesting features that Free Pascal currently doesn't?

In the case of Modula-2, coroutines. A coroutine is in-thread, you can transfer control from one coroutine to another at any point and then later revert to where you left off. At least some implementations also had IOTransfer() which could be hooked onto a physical interrupt, and those together are enough to write a scheduler.

The other obvious thing was IF THEN END and IF THEN ELSE END etc. which, while not quite as elegant as Pascal syntax, did eliminate the dangling else issue.

Unfortunately ALGOL's inline conditional a := IF b THEN c ELSE d;, which I consider to be an unfortunate omission from Pascal etc., is at least visually inconsistent with this.

Modula-2 reserves braces { } to delimit a set of elements, and insists on (* *) (which were originally digraphs for braces) for comments. It also allows both single and double quotes for strings so that you could write e.g. "Wirth's Modula-2" (in some other stuff I've done I've allowed quote format to be extended and for quoted strings to carry additional info around with them, so that e.g. / / can be used to delimit a string to be treated as a regex when comparisons are involved, or as a backref if encountered as an rvalue.

There were undoubtedly other things which were standardised as part of the language rather than being de-facto facilities defined by the implementation. LOOP EXIT END springs to mind.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 16, 2019, 03:38:29 pm
A better block structure. Omits begin for all non procedure/function blocks, and makes END mandatory (also for one line blocks).

Taken from ALGOL-68, not in ALGOL-W. I've already commented about Wirth and the ALGOL-68 standardisation process.

inner modules (nested units), which more or less served as a information hiding building block within a module/unit.

Pioneered by Brinch Hansen.

Some interesting runtime library concepts that are however dated now 
  •         textwindowing unit, more than Crt, less than FV
  •         a cooperative multitasking unit

Not sure those were in the language, either as defined by Wirth or in the later (ISO?) standard. Might have been TopSpeed-specific, although coroutines were in the language.

The water is a bit muddied here by stuff that I think Wirth brought back to Europe from PARC, which were later sold by Logitech (e.g. a mouse toolkit which was the first time I'd seen the source of an input event message handling loop).

case sensitivity. Not an advantage IMHO

Arguable. Even if it's not mandatory, I'd like a way of enforcing it purely to improve documentation etc.

unsigned types by default (jury is still out on this one too)

Note that both signed integers and unsigned cardinals were supported.

End 'procedurename'  at the end of a block. A mixed blessing, made refactoring code more complicated, but "missing end"  kind of errors were less confusing. I think a distinct procedural END is a good thing, but recycling the procedurename a bridge too far.

Note that at least some ALGOL-60 implementations treated everything after END as a comment, allowing the procedure name to be put there even if it wasn't checked.

But above all I really missed a decent way of handling strings. M2 string handling was too manual for my taste. I changed to FPC in 1998, but kept maintaining the old codebases till 2001-2003, when I move to win2000, first at work, later at home, and the dos binaries started very slow under windows 2000, so I ported the code to FPC.

I think that M2 strings were /defined/ as being zero-terminated. Can't remember whether they were based on element zero, but they were basically arrays of chars rather than having special handling.

Oberon was a minimalistic OOP follow up to Modula2, and IMHO too limited to function.

Agreed, from what little I know of it. I'd add that as I understand it there's also an Oberon GUI environment which still has its enthusiasts, but the real successor to M2 was M3 etc.

Ada's story is different and more distinct from the real Wirthian languages.  Best read up in wikipedia or so.

Agreed. Also Ada mandated that there could not be any language subsets and that a substantial "workbench" should accompany the compiler, and it was those that made it sufficiently large that it didn't fit onto an affordable PC.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 16, 2019, 05:49:51 pm
inner modules (nested units), which more or less served as a information hiding building block within a module/unit.
Pioneered by Brinch Hansen.

I always thought they were a bit overly stylistic, and I never really used them/had a use for them. That said, I'm not that big on information hiding other than some basic level between modules. IMHO it is a good concept that is often take way too far.

Quote
Some interesting runtime library concepts that are however dated now 
  •         textwindowing unit, more than Crt, less than FV
  •         a cooperative multitasking unit

Not sure those were in the language, either as defined by Wirth or in the later (ISO?) standard. Might have been TopSpeed-specific, although coroutines were in the language.

It is the book (by N. Wirth, but a Dutch translation) about the standard, but it says it is not part of the standard. But many compilers had them. (terminal, (text)window(ing) etc). I liked the TS Window module.

It describes coroutines exclusively in the context of standard procedures. (no language enhancements for them, so could be purely library). Correct me if I'm wrong, it has been a while since I did anything with that.

Quote
The water is a bit muddied here by stuff that I think Wirth brought back to Europe from PARC, which were later sold by Logitech (e.g. a mouse toolkit which was the first time I'd seen the source of an input event message handling loop).

The book lists that too, modules Terminal, FileSystem, InOut, RealInout, Windows, TextWindows, GraphicWindows, CursorMouse, Menu, Storage, Mathlib0. 

Quote
case sensitivity. Not an advantage IMHO

Arguable. Even if it's not mandatory, I'd like a way of enforcing it purely to improve documentation etc.

Use formatters or IDEs, doesn't belong in a language. The old joke was that Wirth simply wanted twice the amount of one digit variables.

Quote
unsigned types by default (jury is still out on this one too)

Note that both signed integers and unsigned cardinals were supported.

In retrospect, maybe I understood it wrong at the time. In Pascal, signed being default means that mixed expressions get promoted to the signed integer that is a superset of both, so that the full range is supported.

Maybe it matters less in M2 what default is because it does not allow mixing of integer types (and likewise real types) like Pascal and C do. You need to explicitely cast and thus indicate the calculation type.

Quote
But above all I really missed a decent way of handling strings. M2 string handling was too manual for my taste. I changed to FPC in 1998, but kept maintaining the old codebases till 2001-2003, when I move to win2000, first at work, later at home, and the dos binaries started very slow under windows 2000, so I ported the code to FPC.

I think that M2 strings were /defined/ as being zero-terminated. Can't remember whether they were based on element zero, but they were basically arrays of chars rather than having special handling.

Afaik the only special handling was assignment of literals to array of chars even if sizes mismatched. The convention was zero terminated except when the length of the string matched the size of the allocation, then it was  _not_ zero terminated.    But static arrays only.

In assembler it was repne scasb iirc. with cx the size of the allocation. If it ran to completion, it was the non zero terminated case, if it didn't, there was a zero termination and the remainder in cx gave the position from the back.

Quote
Oberon was a minimalistic OOP follow up to Modula2, and IMHO too limited to function.

Agreed, from what little I know of it. I'd add that as I understand it there's also an Oberon GUI environment which still has its enthusiasts, but the real successor to M2 was M3 etc.

Yeah.  The M3 compilers I saw were sad, so I mostly ignored that language.

Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 16, 2019, 06:47:36 pm
It describes coroutines exclusively in the context of standard procedures. (no language enhancements for them, so could be purely library). Correct me if I'm wrong, it has been a while since I did anything with that.

Coroutines were definitely a fundamental part of the language. They did a lot of stack etc. manipulation that isn't really suitable for putting in a library... I forget how I managed it but I mapped coroutine transfers directly onto x86 call/jump gates.

case sensitivity. Not an advantage IMHO

Use formatters or IDEs, doesn't belong in a language. The old joke was that Wirth simply wanted twice the amount of one digit variables.

Modula-2 was the first language Wirth had worked on which was effectively guaranteed to have a full ASCII character set. The sequence of tools which culminated with ALGOL-W was roughed out on a Burroughs mainframe which had a 6-bit (64-character) character set, Pascal tried to be portable including (as somebody mentioned a day or so ago) to CDC systems which basically had a 64-bit character set plus multiple escapes to extend it. And while that was going on luminaries such as Xerox PARC were still using ASCII-63, which had a left-arrow rather than an underscore.

Afaik the only special handling was assignment of literals to array of chars even if sizes mismatched. The convention was zero terminated except when the length of the string matched the size of the allocation, then it was  _not_ zero terminated.    But static arrays only.

In assembler it was repne scasb iirc. with cx the size of the allocation. If it ran to completion, it was the non zero terminated case, if it didn't, there was a zero termination and the remainder in cx gave the position from the back.

The x86 string instructions are surprisingly similar to the much-maligned string instructions on the Burroughs B5000 of 15 years earlier. Much-maligned since if used incautiously an unprivileged user could trample over memory he didn't oughter.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: winni on December 16, 2019, 08:54:18 pm
Hi!

I worked in the 80s and 90s some years with Modula II.

Marcovs  list is nearly complete but one point was the main reason that Modula was developed: The modules!

In the original Wirth Pascal and in Turbo Pascal including version 3 you had no modules aka units or libraries. So you got only ONE Pascal file - and a horrible bunch of include files.

That was the reason why UCSD Pascal introduced the libraries and was delivered with the system.library. Turbo Pascal had "stolen" that concept and introduced it in version 4.

So N. Wirth recognized that it was high time to implement the module concept.

The other changes are more or less cosmetic.

Two disadvanteges should be mentioned:

The separation of interface and implementation in two files complicates the coding and leads to the search for a good but small multi file editor (joe, EVE) (we were in the 80s!).

And the introducing of the case sensivity was an idiotic idea. As Pascal man who was not used to it it gave me hundreds of unnecessary compiler runs.

The coroutines were definitly a big step but seldom used in those times.


Winni

PS: Untyped vars you could do with an undocumented trick already in UCSD Pascal.

This was allowed by the compiler:

Code: Pascal  [Select][+][-]
  1. Procedure DemoUntyped(x,y: integer; var z );
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 16, 2019, 10:17:39 pm
Yes, but not just modules, some other functionality (like open array parameters) are now already in FPC too.

Depending on compiler, the interface of the units (definitions of the modules in M2 talk) are sometimes stored tokenized. But afaik not as complete symbolic streams as TP, Delphi and FPC do.

I didn't feel as strong about the separation of files, but I've mostly used during the nineties and always used IDEs, and used joe only for small potato programming (and even joe can open multiple files). With more grown up IDEs like Lazarus that have syntactic source navigation (codetools), it is even less pronounced

The M2 compilers that I knew were spending more time in parsing DEF files than in actually compiling code. That is a C disease, but in M2 it was unnecessary. Going back to TP (for a brief while before migrating to FPC) felt as a blessing.


Another big difference ( and one I like to see in FPC someday) is more control over what identifiers are imported and exported (un)qualified.

This both in the module definition, you can e.g. say that symbol X from unit Y is ALWAYS exported qualified (so you must always write Y.X to use it. Imagine that X is a very common word, like "write" or "seek", and you see the point)

.. as in the module/program importing the module. So a program can chose to import all symbols of module Y qualified only. (so you must always use Y.).  You can also import some symbols unqualified (so that they are accessible without modulename prefix)

What I didn't like is that there is no equivalent of USES to mass import symbols unqualified.

One of the reasons to implement it in Pascal is because afaik some similar functionality is in the Extended Pascal (1990) standard.



Title: Re: Modula, Oberon or Ada
Post by: marcov on December 16, 2019, 10:27:03 pm
Apropos UCSD, I got this to compile last weekend:

https://www.wirth-dijkstra-langs.org/index.html

My fixed version: http://www.stack.nl/~marcov/files/p6-fpc.zip
Title: Re: Modula, Oberon or Ada
Post by: winni on December 16, 2019, 11:06:18 pm
Hi!

And as mentioned the string handling unit was lousy. Here:
https://www.modula2.org/reference/isomodules/isomodule.php?file=STRINGS.DEF (https://www.modula2.org/reference/isomodules/isomodule.php?file=STRINGS.DEF)

The first thing we did with Modula II was to port our homebrew StringUtils and the TaDunit (Time and Date unit) from Stride Micro (Reno Nevada) from UCSD to M2.

There was not even a Trim (aka Strip aka EatSpaces) in M2!

@markov:  Now I know what to do on christmas: P6 .....!

Winni
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 16, 2019, 11:33:18 pm
@markov:  Now I know what to do on christmas: P6 .....!

If you want to see what I was up to using M2, see e.g. http://www.stack.nl/~marcov/xtdlib100.zip  Well, probably more asm than M2, but still :-)

One of the things I did most with M2 was parsing logfiles, so to speedup I had quite some string and datetime routines in assembler.
Title: Re: Modula, Oberon or Ada
Post by: PascalDragon on December 17, 2019, 10:47:59 am
  • FOR had a BY clause.
Which reminds me that I wanted to take a look at this (https://bugs.freepascal.org/view.php?id=25549) old feature request again.  :-[
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 17, 2019, 11:12:20 am
@winni: do you know anything about the history of modularisation, specifically what was in the original Modula? Brinch Hansen's modules weren't cross-file IIRC, if anything they were more a groping towards OO than anything else.

I'm ambivalent on separate .def and .mod files, but I think that the important thing was that the definition modules were precompiled and consistency was protected by makefile-like timestamp checking. A colleague presented a paper where this was used to good effect in a "software hut" teaching environment, with definition modules written by different teams and then shuffled around- something which would have been far more difficult to enforce with untimestamped  include files.

I'm a little bit vague on the history of separate compilation, but I think it entered the mainstream with the IBM S/360 in the mid-60s. I don't think that Burroughs had anything directly comparable at the time, although they did have a way of including "libraries"- large chunks of source- in a compilation from tape or (later) disk. And Burroughs- I think- gave us the whole idea of dollar cards... and UC San Diego at one time had one of their mainframes.

Going back to M2... in principle you shouldn't need to have the definition module open in an editor, since once written and compiled it shouldn't be changed. One of the M2 successors took that a stage further and was able to brand modules as being permitted to do questionable things, and obviously messing around with that should be a senior developer's decision even if most implementation coding was being done by somebody less skilled. Quite frankly I think I'd like to see more of this sort of thing: "this unit has some pointer arithmetic in it and MUST NOT be fooled with by junior staff".

OTOH, I was once working on a disc sector display program where various display units bid depending on how confident they were that they could handle the format. What I really wanted there was a single definition module and multiple implementation modules, or failing that an include file in the definition module... neither of which the language implementations provided and in one case I hit a compiler limit (possibly TopSpeed v1, and it was something like the total number of procedures defined in the entire population of definition modules).

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: guest64953 on December 17, 2019, 11:44:34 am
Just to remind I found this project is the Oberon equivalent of Free Pascal: https://github.com/kekcleader/FreeOberon (https://github.com/kekcleader/FreeOberon) It's even listed by the FSF: https://directory.fsf.org/wiki/Free_Oberon (https://directory.fsf.org/wiki/Free_Oberon)
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 17, 2019, 11:52:59 am
Just to remind I found this project is the Oberon equivalent of Free Pascal: https://github.com/kekcleader/FreeOberon (https://github.com/kekcleader/FreeOberon) It's even listed by the FSF: https://directory.fsf.org/wiki/Free_Oberon (https://directory.fsf.org/wiki/Free_Oberon)

There's also apparently people working on the operating system aspect of Oberon.

I don't know to what extent these are praiseworthy endeavours, unless they're also actively being used to teach newcomers to the profession (which for a long time was the objective of MINIX, as one particular example). Oberon (the language) dates back to when people looked at Ada and considered it too big and complex, but by today's standards 1980s Ada is probably rather svelte and feature-deficient.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: valdir.marcos on December 19, 2019, 09:02:26 am
For those who have already used Modula, Oberon or Ada.
Do those programming languages have any interesting features that Free Pascal currently doesn't?
From memory, Modula2 was basically an incompatible continuation of Pascal, and had
  • A better block structure. Omits begin for all non procedure/function blocks, and makes END mandatory (also for one line blocks).
Wouldn't this make Modula-2 even more verbose than Pascal?

Quote
  • inner modules (nested units), which more or less served as a information hiding building block within a module/unit.
Is this still necessary when most people use an IDE [Lazarus] to program?

Quote
[/li]
[li] Opague pointer type. You could declare something in the interface as (geneneric) pointer, and redefine the pointer as a pointer to some record in the implementation. Great for handle types.[/li][/list]
Quote
  • FOR had a BY clause.
A controversial feature, but I think this could be a good idea.
However, I must add that I'll rarely need it...
Quote
  • Some interesting runtime library concepts that are however dated now 
    •         textwindowing unit, more than Crt, less than FV
    •         a cooperative multitasking unit
Quote
  • case sensitivity. Not an advantage IMHO
I agree.
Quote
  •   unsigned types by default (jury is still out on this one too)
Quote
  • End 'procedurename'  at the end of a block. A mixed blessing, made refactoring code more complicated, but "missing end"  kind of errors were less confusing. I think a distinct procedural END is a good thing, but recycling the procedurename a bridge too far.
Is this still necessary when most people use an IDE [Lazarus] to program?

Quote
But above all I really missed a decent way of handling strings. M2 string handling was too manual for my taste. I changed to FPC in 1998, but kept maintaining the old codebases till 2001-2003, when I move to win2000, first at work, later at home, and the dos binaries started very slow under windows 2000, so I ported the code to FPC.

Oberon was a minimalistic OOP follow up to Modula2, and IMHO too limited to function.

Ada's story is different and more distinct from the real Wirthian languages.  Best read up in wikipedia or so.
Title: Re: Modula, Oberon or Ada
Post by: valdir.marcos on December 19, 2019, 09:13:03 am
For those who have already used Modula, Oberon or Ada.
Do those programming languages have any interesting features that Free Pascal currently doesn't?
In the case of Modula-2, coroutines. A coroutine is in-thread, you can transfer control from one coroutine to another at any point and then later revert to where you left off. At least some implementations also had IOTransfer() which could be hooked onto a physical interrupt, and those together are enough to write a scheduler.
Isn't this already solved by threads?

Quote
The other obvious thing was IF THEN END and IF THEN ELSE END etc. which, while not quite as elegant as Pascal syntax, did eliminate the dangling else issue.
Not so elegant for Pascal, but still a clean feature for another languages.

Quote
Unfortunately ALGOL's inline conditional a := IF b THEN c ELSE d;, which I consider to be an unfortunate omission from Pascal etc., is at least visually inconsistent with this.
Too ugly for Pascal, but an internal IIF() would be fine instead of external big IfThen().

Quote
Modula-2 reserves braces { } to delimit a set of elements, and insists on (* *) (which were originally digraphs for braces) for comments. It also allows both single and double quotes for strings so that you could write e.g. "Wirth's Modula-2" (in some other stuff I've done I've allowed quote format to be extended and for quoted strings to carry additional info around with them, so that e.g. / / can be used to delimit a string to be treated as a regex when comparisons are involved, or as a backref if encountered as an rvalue.
I agree that this point could more coherent.

Quote
There were undoubtedly other things which were standardised as part of the language rather than being de-facto facilities defined by the implementation. LOOP EXIT END springs to mind.
Title: Re: Modula, Oberon or Ada
Post by: valdir.marcos on December 19, 2019, 09:23:39 am
"History
In the 1970s, the US Department of Defense (DoD) was concerned by the number of different programming languages being used for its embedded computer system projects, many of which were obsolete or hardware-dependent, and none of which supported safe modular programming. In 1975, a working group, the High Order Language Working Group (HOLWG), was formed with the intent to reduce this number by finding or creating a programming language generally suitable for the department's and the UK Ministry of Defence requirements.
After many iterations beginning with an original Straw man proposal the eventual programming language was named Ada. The total number of high-level programming languages in use for such projects fell from over 450 in 1983 to 37 by 1996."
https://en.wikipedia.org/wiki/Ada_(programming_language)

Oberon was a minimalistic OOP follow up to Modula2, and IMHO too limited to function.
Agreed, from what little I know of it. I'd add that as I understand it there's also an Oberon GUI environment which still has its enthusiasts, but the real successor to M2 was M3 etc.
Ada's story is different and more distinct from the real Wirthian languages.  Best read up in wikipedia or so.
Agreed. Also Ada mandated that there could not be any language subsets and that a substantial "workbench" should accompany the compiler, and it was those that made it sufficiently large that it didn't fit onto an affordable PC.
As I read, Ada was really a different story.
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 19, 2019, 09:31:13 am
In the case of Modula-2, coroutines. A coroutine is in-thread, you can transfer control from one coroutine to another at any point and then later revert to where you left off. At least some implementations also had IOTransfer() which could be hooked onto a physical interrupt, and those together are enough to write a scheduler.
Isn't this already solved by threads?

No. A thread is an operating system construct which is largely there to distribute processing over multiple processors.

A coroutine is entirely an in-language thing.

You can implement thread/process management on top of coroutines, but not the other way round. I'm afraid that I don't really have any good real-world examples that I can draw on, but I think that to some extent it would be fair to say that the rest of the World has rediscovered them as "continuations": functions that can be exited but preserve all their state. Think about having multiple state machines, each with state entirely compartmentalised into a separate coroutine.

I can't remember the exact Modula-2 semantics, but I think that in effect you ended up with a "cactus stack" so a coroutine had to be careful with referring to variables in an "older" function which might have disappeared. I can't remember whether IOTRANSFER() was standardised but the idea was that it could be hooked onto an interrupt, however there was controversy over its implementation (specifically, how well it should accommodate interrupt priorities).

In terms of information hiding etc. you can do as well- or better- with OO techniques. But Modula-2 was intended to be able to write an OS, and coroutines are the abstraction that allows context to be changed (specifically, CPU context: I don't think that Wirth had really considered large-scale memory context changing which these days is implemented by page tables).

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: valdir.marcos on December 19, 2019, 09:44:06 am
Yes, but not just modules, some other functionality (like open array parameters) are now already in FPC too.

Depending on compiler, the interface of the units (definitions of the modules in M2 talk) are sometimes stored tokenized. But afaik not as complete symbolic streams as TP, Delphi and FPC do.

I didn't feel as strong about the separation of files, but I've mostly used during the nineties and always used IDEs, and used joe only for small potato programming (and even joe can open multiple files). With more grown up IDEs like Lazarus that have syntactic source navigation (codetools), it is even less pronounced
Quote
The M2 compilers that I knew were spending more time in parsing DEF files than in actually compiling code. That is a C disease, but in M2 it was unnecessary.
Interesting.

Quote
Going back to TP (for a brief while before migrating to FPC) felt as a blessing.
Quote
Another big difference ( and one I like to see in FPC someday) is more control over what identifiers are imported and exported (un)qualified.

This both in the module definition, you can e.g. say that symbol X from unit Y is ALWAYS exported qualified (so you must always write Y.X to use it. Imagine that X is a very common word, like "write" or "seek", and you see the point)

.. as in the module/program importing the module. So a program can chose to import all symbols of module Y qualified only. (so you must always use Y.).  You can also import some symbols unqualified (so that they are accessible without modulename prefix)

What I didn't like is that there is no equivalent of USES to mass import symbols unqualified.

One of the reasons to implement it in Pascal is because afaik some similar functionality is in the Extended Pascal (1990) standard.
Could you elaborate a bit more?
Does Free Pascal have a weak control of imported and exported identifiers?
Title: Re: Modula, Oberon or Ada
Post by: valdir.marcos on December 19, 2019, 10:04:57 am
Just to remind I found this project is the Oberon equivalent of Free Pascal: https://github.com/kekcleader/FreeOberon (https://github.com/kekcleader/FreeOberon) It's even listed by the FSF: https://directory.fsf.org/wiki/Free_Oberon (https://directory.fsf.org/wiki/Free_Oberon)
There's also apparently people working on the operating system aspect of Oberon.
I don't know to what extent these are praiseworthy endeavours, unless they're also actively being used to teach newcomers to the profession (which for a long time was the objective of MINIX, as one particular example). Oberon (the language) dates back to when people looked at Ada and considered it too big and complex, but by today's standards 1980s Ada is probably rather svelte and feature-deficient.
As a result for a lack of job offers, universities are restricting or even dropping practical disciplines of Compiler and Operational System building.
Changing Compiler Building for only Parsers and Minix for Oberon might be examples of that.

News books are trying to catch up this tendency:
"...book offers a one semester introduction into compiler construction..."
Introduction to Compilers and Language Design, Douglas Thain, 2019, 246pp.
https://www.amazon.com/Introduction-Compilers-Language-Design-Douglas/dp/0359142834/

And we also must consider that current students don't have all that math from the 1960's and 1970's any more...
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 19, 2019, 10:23:18 am
> "...book offers a one semester introduction into compiler construction..."

etc. Might not actually be such a bad thing. Teach them the basics, and then if they need to know more they can make the pilgrimage to an established teacher and study at his feet.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 19, 2019, 10:39:16 am
Quote

  • A better block structure. Omits begin for all non procedure/function blocks, and makes END mandatory (also for one line blocks).
Wouldn't this make Modula-2 even more verbose than Pascal?

No, less. You lose way more begins than you gain ends.   An "if then else" with begin..end blocks would keep just one end at the end, and you only lose a short end for every place where there is a single clause (usually after an IF). 

But the nice part is that if you want to expand any block including onelines, you just can start typing, you don't have to insert a block first.   

C programmers have a tendency to always use {}, and an M2 block is 3 or 4 characters (if you count the semicolon after END, C has no semicolon after }), so it is pretty close or the same (if you count e.g. the extra linefeed after the first { too if that is your style), but I like it more visually.

[/list]
Code: Pascal  [Select][+][-]
  1.    IF condition THEN
  2.         statement1;
  3.         statement2
  4.    ELSE
  5.         statement3;
  6.         statement4
  7.         END;
  8.  

  And I liked it.

Quote
Quote
  • inner modules (nested units), which more or less served as a information hiding building block within a module/unit.
Is this still necessary when most people use an IDE [Lazarus] to program?

One can argue if it was ever necessary, but the IDE doesn't change much. Using an IDE hasn't obsoleted other pure information hiding constructs as "private" either.
Quote
Quote
  • FOR had a BY clause.
A controversial feature, but I think this could be a good idea.
However, I must add that I'll rarely need it...

I agree. I mentioned it for completeness, not because I'm a strong proponent of the feature.

Quote
Quote
  • End 'procedurename'  at the end of a block. A mixed blessing, made refactoring code more complicated, but "missing end"  kind of errors were less confusing. I think a distinct procedural END is a good thing, but recycling the procedurename a bridge too far.
Is this still necessary when most people use an IDE [Lazarus] to program?

IDE/Lazarus has no influence. What might make it less needed is that the use of OO extensions make nested procedures not as common as they were. Still it improved the error handling in the case of missing ENDs, and narrowed its scope.

Pascal needs this harder than M2 even, because pascal accepts

[/list]
Code: [Select]
    begin
        begin
        end;
    end;

Which means that when you forget the END in some nested procedure, the outer procedures might be interpreted as such nested blocks, and the error will be on the next function or procedure line.

M2 suffers from this less, since BEGIN is only used for the procedure block. It would halt with an error on the first begin if it didn't have the end 'xx'  extension.
 
I think IDE is something that makes this feature (and other forms of END disambiguation, BASIC style) easier because so many blocks are inserted by the IDE.

I used to have the stance that doing it at procedure ends is a good first order limitation of the scope, and BASIC was overkill.  Nowadays I'm less sure. Maybe if I made a language myself I'd terminate some blocks (FOR, WHILE) too with the keyword (END FOR END WHILE)

As for coroutines, the examples that I have seen were mostly for background tasks, cooperative multitasking style. Afaik the Topspeed compiler came with a traffic light control example. But maybe Mark is right, and should I revisit the feature with newly gained knowledge of continuations.
Title: Re: Modula, Oberon or Ada
Post by: valdir.marcos on December 19, 2019, 11:17:59 am
In the case of Modula-2, coroutines. A coroutine is in-thread, you can transfer control from one coroutine to another at any point and then later revert to where you left off. At least some implementations also had IOTransfer() which could be hooked onto a physical interrupt, and those together are enough to write a scheduler.
Isn't this already solved by threads?
No. A thread is an operating system construct which is largely there to distribute processing over multiple processors.

A coroutine is entirely an in-language thing.

You can implement thread/process management on top of coroutines, but not the other way round. I'm afraid that I don't really have any good real-world examples that I can draw on, but I think that to some extent it would be fair to say that the rest of the World has rediscovered them as "continuations": functions that can be exited but preserve all their state. Think about having multiple state machines, each with state entirely compartmentalised into a separate coroutine.

I can't remember the exact Modula-2 semantics, but I think that in effect you ended up with a "cactus stack" so a coroutine had to be careful with referring to variables in an "older" function which might have disappeared. I can't remember whether IOTRANSFER() was standardised but the idea was that it could be hooked onto an interrupt, however there was controversy over its implementation (specifically, how well it should accommodate interrupt priorities).

In terms of information hiding etc. you can do as well- or better- with OO techniques. But Modula-2 was intended to be able to write an OS, and coroutines are the abstraction that allows context to be changed (specifically, CPU context: I don't think that Wirth had really considered large-scale memory context changing which these days is implemented by page tables).
As for coroutines, the examples that I have seen were mostly for background tasks, cooperative multitasking style. Afaik the Topspeed compiler came with a traffic light control example. But maybe Mark is right, and should I revisit the feature with newly gained knowledge of continuations.
I did understand that co-routines is different from thread, but I could not guess how to use it..
I just remember the "prepare" database command that forces a database command to stay in database server memory to be used recurrently as long as the connection remains active.
For Lazarus, my idea of co-routines would be to prepare a report in background (something that I currently use a thread):
Code: Pascal  [Select][+][-]
  1. begin
  2.   // FortesReport
  3.   frmRelatorio.RLReport1.Prepare;
  4.   frmRelatorio.RLPDFFilter1.FilterPages(frmRelatorio.RLReport1.Pages);
  5.   frmRelatorio.RLReport1.SaveToFile('Relatorio.pdf');
  6. end;
Title: Re: Modula, Oberon or Ada
Post by: 440bx on December 19, 2019, 11:24:59 am
... C has no semicolon after }
and it would be syntactically incorrect to have one since in C a semicolon is a statement terminator (not a separator.)  It's really unfortunate that Pascal has statement separators instead of terminators.

Code: Pascal  [Select][+][-]
  1.    IF condition THEN
  2.         statement1;
  3.         statement2
  4.    ELSE
  5.         statement3;
  6.         statement4
  7.     END;
  8.  

 And I liked it.
I like it too because that way there is no "else" ambiguity, i.e, anything between IF and END belongs to that IF. It also eliminates the necessity for "compound statement" constructs, begin/end pairs in Pascal and { } in C. Another thing I like about it is, it provides less opportunities for some programmers to indulge in incorrect formatting and claim it's a matter of "style". ;)  Without begin/end pairs, "else begin" (on the same line) are gone! :)

Pascal needs this harder than M2 even, because pascal accepts

Code: [Select]
    begin
        begin
        end;
   end;
Along with the two (2) null statements in that code that the compiler has to deal with gracefully because the semicolons are separators instead of terminators.

Maybe if I made a language myself I'd terminate some blocks (FOR, WHILE) too with the keyword (END FOR END WHILE)
languages that implement "end of construct" that way are much easier to visually group/block than those that do not, e.g, C and Pascal.
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 19, 2019, 11:28:16 am
> For Lazarus, my idea of co-routines would be to prepare a report in background (something that I currently use a thread):

Obviously, a thread has the advantage that it runs in the background which a coroutine emphatically doesn't.

I don't know whether there are situations where one has to consider "coroutine safety" in the same way that one has to consider thread safety... I suspect that it's a subset (i.e. something can be coroutine-safe but not thread-safe).

Again, a whole lot of this stuff was considered by Burroughs in the 1960s, and supported as part of the language by their ALGOL implementation (which also had limited success for exceptions etc.). And both Dijkstra and Knuth were paid consultants for Burroughs, with McCarty (boo, lithp) their sworn enemy by some accounts :-)

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 19, 2019, 11:33:33 am
> I like it too because that way there is no "else" ambiguity, i.e, anything between IF and END belongs to that IF.

I'd add here that some early (ALGOL) manuals made extremely heavy going of explaining nested conditionals, I suspect in part because indentation was used far less in the punched card era so the technical authors couldn't intuitively see what they were expected to explain.

Perhaps part of the problem with "dangling else" etc., which were resolved by ALGOL-68 and Modula-2, was that far too few people really understood the syntax.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 19, 2019, 01:57:29 pm
> For Lazarus, my idea of co-routines would be to prepare a report in background (something that I currently use a thread):

Obviously, a thread has the advantage that it runs in the background which a coroutine emphatically doesn't.

I don't know whether there are situations where one has to consider "coroutine safety" in the same way that one has to consider thread safety... I suspect that it's a subset (i.e. something can be coroutine-safe but not thread-safe).

E.g. VCL usage.   

Cactus stack also rings a bell. To be honest I think if one would want to resurrect this, one would have to dig into old implementations and their usecases.
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 19, 2019, 02:02:58 pm
... C has no semicolon after }
and it would be syntactically incorrect to have one since in C a semicolon is a statement terminator (not a separator.)  It's really unfortunate that Pascal has statement separators instead of terminators.

It works both ways. Pascal can omit them in places where C can't (e.g. before an END). I think in M2 it is a terminator though.

To be honest I never cared much either way, except the disambiguation of nested ELSE with semicolons in Pascal. That always felt contrived.

Quote
I like it too because that way there is no "else" ambiguity, i.e, anything between IF and END belongs to that IF. It also eliminates the necessity for "compound statement" constructs, begin/end pairs in Pascal and { } in C. Another thing I like about it is, it provides less opportunities for some programmers to indulge in incorrect formatting and claim it's a matter of "style". ;)  Without begin/end pairs, "else begin" (on the same line) are gone! :)

Dangling else elimination was the core reason indeed. But for me it is not so much that (as in how often do you encounter that) as that the solution is very elegant and readable in daily use.

Quote
Maybe if I made a language myself I'd terminate some blocks (FOR, WHILE) too with the keyword (END FOR END WHILE)
languages that implement "end of construct" that way are much easier to visually group/block than those that do not, e.g, C and Pascal.

C has so many caveats where a small typing error suddenly returns hundreds of errors on a previously compiling source that I think for C this is hopeless any which way. It has bigger problems.
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 19, 2019, 02:26:17 pm
Quote
One of the reasons to implement it in Pascal is because afaik some similar functionality is in the Extended Pascal (1990) standard.
Could you elaborate a bit more?
Does Free Pascal have a weak control of imported and exported identifiers?

Little to none. If you have a symbol X you basically have two choices,  put it in the interface or not.

If it is in the interface then all units that USES that unit see it as  unitname.X and  just X.

I took the book to reread the syntax in Wirths book and it is different from what I was used to (Topspeed Modula2).  The stuff in the book sounds weird to me for non nested modules.

Anyway, you can imagine that you might want to import e.g. unit Windows in a way that you need to prefix Windows. to all identifiers to use them ("QUALIFIED"). This way the gazillion identifiers in unit Windows won't be in your default scope, and using something from the module is a conscious choice.

However if you were a die hard windows programmer and doing e.g. a complicated overlay using the metafile format/api in a certain unit. Then you would want to get some identifiers (drawcircle, drawtext etc) to be used without qualification.

instead of USES Windows you get

Code: Pascal  [Select][+][-]
  1. From Windows import Drawcircle,drawtext;  // to be used without unit. prefix
  2. Uses QUALIFIED Windows;
  3.  
There are also some tricks in the used unit.

E.g. assume unit Windows had a procedure write, read etc. A normal uses would constantly risk overriding the more used general definition.

To avoid this, unit windows can say

Code: Pascal  [Select][+][-]
  1. export qualified read,write;

to make sure that you can only use read and write with windows prefix, regardless how it is USESed (but afaik FROM.. IMPORT goes over this)
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 20, 2019, 09:34:05 am
Cactus stack also rings a bell. To be honest I think if one would want to resurrect this, one would have to dig into old implementations and their usecases.

I think this is implicit to any language that allows up-level addressing via chained frames or a "display" which keeps track of areas of the stack(s). You can pass (the address of) a variable on a stack to a thread's constructor, or simply assume that variables remain valid.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 20, 2019, 09:36:37 am
Quote
Unfortunately ALGOL's inline conditional a := IF b THEN c ELSE d;, which I consider to be an unfortunate omission from Pascal etc., is at least visually inconsistent with this.
Too ugly for Pascal, but an internal IIF() would be fine instead of external big IfThen().
Emphasising that an inline IF does not evaluate both expressions, while an IfThen() does. And I'm unhappy with something like IIF() that looks like a function but has different evaluation rules.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 20, 2019, 09:40:03 am
Quote
Quote
  • End 'procedurename'  at the end of a block. A mixed blessing, made refactoring code more complicated, but "missing end"  kind of errors were less confusing. I think a distinct procedural END is a good thing, but recycling the procedurename a bridge too far.
Is this still necessary when most people use an IDE [Lazarus] to program?

IDE/Lazarus has no influence. What might make it less needed is that the use of OO extensions make nested procedures not as common as they were. Still it improved the error handling in the case of missing ENDs, and narrowed its scope.

Also any help that the syntax gives to external refactoring etc. tools is probably valuable.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 20, 2019, 11:26:33 am
Cactus stack also rings a bell. To be honest I think if one would want to resurrect this, one would have to dig into old implementations and their usecases.

I think this is implicit to any language that allows up-level addressing via chained frames or a "display" which keeps track of areas of the stack(s). You can pass (the address of) a variable on a stack to a thread's constructor, or simply assume that variables remain valid.

Yes. It is also the case with nested procedures. ( type  tprocedure = procedure is nested;), only valid till the parent returns. It was needed for ISO and was made visible in the FPC dialects via is nested.

But what I meant is if the feature has such caveats, then it depends IMHO on the value of the usecases, if it should be reimplemented in a future M2 implementation (does gm2 do it?)

Hmm. GM2 site:

Quote
coroutines have been implemented in the PIM style and these are accessible from SYSTEM. A number of supporting libraries (executive and file descriptor mapping to interrupt vector libraries are available through the -flibs=pim-coroutines,pim switch).

Also interesting:

Quote
much better dwarf-2 debugging support and when used with gdb the programmer can display RECORDs, ARRAYs, SETs, subranges and constant char literals in Modula-2 syntax
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on December 20, 2019, 12:01:15 pm
Yes. It is also the case with nested procedures. ( type  tprocedure = procedure is nested;), only valid till the parent returns. It was needed for ISO and was made visible in the FPC dialects via is nested.

No, since when you have a nested procedure you know that upper-level stackframes are still valid. You don't know that for threads or coroutines which have their own stack, but might internally have references to the parent stack.


MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: marcov on December 20, 2019, 12:05:24 pm
Yes. It is also the case with nested procedures. ( type  tprocedure = procedure is nested;), only valid till the parent returns. It was needed for ISO and was made visible in the FPC dialects via is nested.

No, since when you have a nested procedure you know that upper-level stackframes are still valid. You don't know that for threads or coroutines which have their own stack, but might internally have references to the parent stack.

No. A function might store the nested function reference in a list to be called later, and return. Then later it gets called.

It doesn't matter if the list is some structure related to coroutines, or some eventhandler list in Turbo/free vision

I meant to say both cases have stack related boundary conditions that are not enforced.
Title: Re: Modula, Oberon or Ada
Post by: guest65109 on January 14, 2020, 11:53:14 am
What I dislike most from Oberon and Component Pascal is they are case sensitive and they force keywords to be UPPERCASE. I tried to write code in Oberon with OBNC compiler but as soon as I tried to write something more complex than HelloWorld everything turned out to be a nightmare. I realized I hate having to press CAPS LOCK every time I want to type a keyword so finally I gave up and quit. Anyway, this Free Pascal currently still is the best Pascal dialect because it's suitable practical purpose, not only teaching like these later Wirthian languages. It's a balance between verbose and practical.

These languages must have very intelligent and powerful IDEs to make them usable because they are overly verbose. The IDEs have to generate all of the boilerplate code for us (the OOP of them is very different, where object is pointer to procedure) and when we type keywords in lowercase it has to convert them to uppercase on the fly.

Because of their over verbose these languages (no, I didn't include Ada) are rarely adopted by the mass. Finding a text editor with proper syntax highlighting for them is very difficult let alone such powerful IDEs! After hours searching the net, finally, I found one text editor could highlight Oberon code (despite not complete, but having something partially work is better than nothing), it's Cudatext. Thank you, Alextp, for this text editor.
Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on January 14, 2020, 12:32:17 pm
What I dislike most from Oberon and Component Pascal is they are case sensitive and they force keywords to be UPPERCASE. I tried to write code in Oberon with OBNC compiler but as soon as I tried to write something more complex than HelloWorld everything turned out to be a nightmare.

I've written a microkernel using Modula-2 which was case-sensitive. Editing wasn't particularly arduous, even allowing for the comparatively crude IDEs available in the 1990s.

Try debugging on bare metal. That will give you something to complain about >:-)

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: Awkward on January 14, 2020, 01:40:25 pm
Finding a text editor with proper syntax highlighting for them is very difficult let alone such powerful IDEs!
https://github.com/programmingthomas/Oberon-Highlight (https://github.com/programmingthomas/Oberon-Highlight) oberon highlight for VIM
https://github.com/kekcleader/FreeOberon (https://github.com/kekcleader/FreeOberon) Oberon text IDE with code highlight
https://sourceforge.net/projects/npp-plugins/files/Oberon2Lexer/ (https://sourceforge.net/projects/npp-plugins/files/Oberon2Lexer/) Notepad++ oberon lexer
and i thin, FAR's Colorer have it too
if only i wanted, i can find more oberon code highlight tools and even IDE. (even if some of them are old and forgotten)
Title: Re: Modula, Oberon or Ada
Post by: marcov on January 14, 2020, 02:45:05 pm
What I dislike most from Oberon and Component Pascal is they are case sensitive and they force keywords to be UPPERCASE.

I don't like it either.

Quote
  Free Pascal currently still is the best Pascal dialect because it's suitable practical purpose, not only teaching like these later Wirthian languages. It's a balance between verbose and practical.

Not dialect, but development system as a whole. Actively maintained, reasonably complete, first class windows support  (at least compared to the other Wirthian languages)

Quote
These languages must have very intelligent and powerful IDEs to make them usable because they are overly verbose.

As said in other threads, I don't subscribe to your whole verbosity argumentation (and even less so for M2 which has tighter block structure).

If it was all true, people would complain about curly braces languages wearing out the shift buttons to make all those  {}&! etc. You never hear that, so it is all in the head.

Quote
The IDEs have to generate all of the boilerplate code for us (the OOP of them is very different, where object is pointer to procedure) and when we type keywords in lowercase it has to convert them to uppercase on the fly.

Oberon however is one of the languages with the shortest grammar. Writing a highlighter and some tools should be a breeze. But what to use it with ?

Afaik Microsoft supported component pascal with the first iterations of .NET.  So an old Visual Studio (2003, 2005?) might do.

Title: Re: Modula, Oberon or Ada
Post by: MarkMLl on January 14, 2020, 02:48:58 pm
Synedit at https://github.com/SynEdit/SynEdit/blob/master/Source/SynHighlighterM3.pas has a highlighter for Modula-3 which could probably be fairly easily made compatible with the Lazarus IDE and then modified for Oberon.

This is something where whining is quite simply inexcusable: if somebody doesn't like it then fix it.

MarkMLl
Title: Re: Modula, Oberon or Ada
Post by: guest65109 on January 14, 2020, 04:06:46 pm
What I dislike most from Oberon and Component Pascal is they are case sensitive and they force keywords to be UPPERCASE. I tried to write code in Oberon with OBNC compiler but as soon as I tried to write something more complex than HelloWorld everything turned out to be a nightmare.

I've written a microkernel using Modula-2 which was case-sensitive. Editing wasn't particularly arduous, even allowing for the comparatively crude IDEs available in the 1990s.

Try debugging on bare metal. That will give you something to complain about >:-)

MarkMLl

I would prefer all of my code to be lowercase. As of now I'm still write my pascal code in lowercase and don't care about any convention.
Title: Re: Modula, Oberon or Ada
Post by: guest65109 on January 14, 2020, 04:10:26 pm
Finding a text editor with proper syntax highlighting for them is very difficult let alone such powerful IDEs!
https://github.com/programmingthomas/Oberon-Highlight (https://github.com/programmingthomas/Oberon-Highlight) oberon highlight for VIM
https://github.com/kekcleader/FreeOberon (https://github.com/kekcleader/FreeOberon) Oberon text IDE with code highlight
https://sourceforge.net/projects/npp-plugins/files/Oberon2Lexer/ (https://sourceforge.net/projects/npp-plugins/files/Oberon2Lexer/) Notepad++ oberon lexer
and i thin, FAR's Colorer have it too
if only i wanted, i can find more oberon code highlight tools and even IDE. (even if some of them are old and forgotten)

I'm Linux. So npp is out. I don't use vim. I even don't know how to exit vim. So vim is out. FreeOberon is not an text editor. I want an text editor with Oberon/Component Pascal syntax highlight, not an IDE. So all of your suggestions are out.

Cudatext, on the other hand, truly available everywhere. You could check on it homepage. It covers all of the platforms I currently run: BSDs, Linux, OI, Haiku and Windows. This again thanks to Free Pascal and Lazarus.
Title: Re: Modula, Oberon or Ada
Post by: guest65109 on January 14, 2020, 04:23:03 pm
As said in other threads, I don't subscribe to your whole verbosity argumentation (and even less so for M2 which has tighter block structure).

If it was all true, people would complain about curly braces languages wearing out the shift buttons to make all those  {}&! etc. You never hear that, so it is all in the head.

I don't agree with you, either. I could type { as fast as begin and the other } or end; should be automatically inserted by the text editor or IDE itself.

Oberon however is one of the languages with the shortest grammar. Writing a highlighter and some tools should be a breeze. But what to use it with ?

Afaik Microsoft supported component pascal with the first iterations of .NET.  So an old Visual Studio (2003, 2005?) might do.

But in reality, very few IDEs or text editors support these languages. I tried Blackbox Component Builder and I could conclude it's something from the Win95 era, as I remember it's not even has syntax highlighting. I don't know why they could even call it an IDE. The only IDE I think good enough is from cfbsoftware (cpIDE) but it is commercial with a delusional price. If I have to choose between buying it and switch to another language, I definitely choose the later.

I don't know if it's just me, Wirthian languages' IDEs (Delphi, cpIDE) tend to have delusional prices. Another non curry braces language with ridiculous price is Eiffel, check the price of Eiffel Studio and you will see how delusional these guys are.
Title: Re: Modula, Oberon or Ada
Post by: del on January 14, 2020, 06:23:56 pm
IMHO case insensitivity is sloppy, annoying, and distracting. If you're writing code you should be instinctively in the habit of thinking like a machine. To the machine, "A" is quite distinct from "a". What's next in the evolution? A language that's phonetically lenient? In which "aisle" and "isle" compile the same as you dictate your code into a microphone?
Title: Re: Modula, Oberon or Ada
Post by: silvestre on January 14, 2020, 06:38:50 pm
People are not machines, fortunately. A good language should help to write legibly, sensitivity in programming is an obvious path of bugs and clumsy errors. If you like computing, you will find that sensitivity mathematically increases the creation of insecure code.

IMHO case insensitivity is sloppy, annoying, and distracting. If you're writing code you should be instinctively in the habit of thinking like a machine. To the machine, "A" is quite distinct from "a". What's next in the evolution? A language that's phonetically lenient? In which "aisle" and "isle" compile the same as you dictate your code into a microphone?
Title: Re: Modula, Oberon or Ada
Post by: marcov on January 14, 2020, 06:42:12 pm
I don't agree with you, either. I could type { as fast as begin and the other } or end; should be automatically inserted by the text editor or IDE itself.

(learn proper two hand typing then)

Anyway, if the curly braces are not bad because autocompleted by the IDE, where does that leave the verbosity argument?

Oberon however is one of the languages with the shortest grammar. Writing a highlighter and some tools should be a breeze. But what to use it with ?

Afaik Microsoft supported component pascal with the first iterations of .NET.  So an old Visual Studio (2003, 2005?) might do.

But in reality, very few IDEs or text editors support these languages. I tried Blackbox Component Builder and I could conclude it's something from the Win95 era, as I remember it's not even has syntax highlighting. I don't know why they could even call it an IDE. The only IDE I think good enough is from cfbsoftware (cpIDE) but it is commercial with a delusional price. If I have to choose between buying it and switch to another language, I definitely choose the later.

Such things (hefty prices or over specialization for certain markets like Education or depending on the US armed forces (ADA)) are the norm if you go outside the most downtrodden paths. Even Xamarin once commanded a hefty price.  And that was C# even!

It has nothing to do with language, but simply being one of the happy few that big corporations provide for free to boost their platform, or not. And if you are not, you must find alternate ways to finance.

Which is one of the reasons why I am with Lazarus/FPC. It is one of the most complete truly free tools, and the tradeoffs just work.

Title: Re: Modula, Oberon or Ada
Post by: del on January 14, 2020, 07:27:23 pm
People are not machines, fortunately. A good language should help to write legibly, sensitivity in programming is an obvious path of bugs and clumsy errors. If you like computing, you will find that sensitivity mathematically increases the creation of insecure code.

IMHO case insensitivity is sloppy, annoying, and distracting. If you're writing code you should be instinctively in the habit of thinking like a machine. To the machine, "A" is quite distinct from "a". What's next in the evolution? A language that's phonetically lenient? In which "aisle" and "isle" compile the same as you dictate your code into a microphone?
Disagree. The compiler should be your friend, an extra "pair of eyes". If the compiler ignores sloppy coding, then the compiler is not your friend. He is your "enabler" of bad habits.
Title: Re: Modula, Oberon or Ada
Post by: marcov on January 14, 2020, 08:04:38 pm
IMHO case insensitivity is sloppy, annoying, and distracting.

Yes, and it HALVES the number of one digit identifiers to boot!
Title: Re: Modula, Oberon or Ada
Post by: Thaddy on January 14, 2020, 08:44:28 pm
IMHO case insensitivity is sloppy, annoying, and distracting.

Yes, and it HALVES the number of one digit identifiers to boot!
Furthermore it has a square root of that of making typo errors.  :D
Title: Re: Modula, Oberon or Ada
Post by: del on January 14, 2020, 10:02:59 pm
IMHO case insensitivity is sloppy, annoying, and distracting.

Yes, and it HALVES the number of one digit identifiers to boot!
Furthermore it has a square root of that of making typo errors.  :D
Maybe - but the compiler catches them before they raise further havoc as bugs.
Title: Re: Modula, Oberon or Ada
Post by: del on January 14, 2020, 10:06:40 pm
IMHO case insensitivity is sloppy, annoying, and distracting.

Yes, and it HALVES the number of one digit identifiers to boot!
True - but if you're using one digit identifiers (other than for indexing), then you've got other problems.
TinyPortal © 2005-2018