PDA

View Full Version : Oberon-2



Bijo
31-05-2007, 05:18 PM
What are all your views on this language? How powerful is it? Can it be used effectively for game development? Have you any proper direction -- preferrably stuff that is being updated and recent -- for libraries and other resources (-- I haven't found a lot).

As a fan of Pascal I haven't really checked out all his invented languages thoroughly, but Oberon-2... from what I see the syntax is just superb and typically Wirth-like (or Pascal-ish). Still very safe, and it's probably even less likely to make errors, because many things were taken out which prevents misuse and makes it less complex.

One little piece of beauty of the syntax I noticed when I checked quickly is that the sign for an inequality test is for instance not <> but # which looks very intuitive, 'cause it represents an equality sign = with a strikethrough. Beautiful.

Furthermore, from what I see the syntax is very consistent and friendly. But I'm just speaking from little experience, so maybe you can all add some useful stuff and maybe correct mine.

JSoftware
31-05-2007, 08:37 PM
I've looked a bit on it in the past but not thoroughly. I just took a peek over the documentation and the more I look the more sexy it looks. It actually does looks rather nice.

The reason I probably won't switch is the lack of units and compilers for it. (Please prove me wrong here)

dmantione
31-05-2007, 09:11 PM
I don't think Oberon is usefull for game development. While the language is well designed, runtime library isn't and severely lacks for real world development. Pascal had initially had this problem too, but over time a reasonably well designed and well documented rtl developed. A more serious problem is that there is a lack of good libraries in Oberon, and a lack of bindings to common external libraries. It isn't even defined how to link to external libraries. The bomb though is that there are no good compilers for Oberon.

Oberon is in typical Wirth style, a well designed language, with an unique view on OOP.

However, there are a few things that don't make it my favourite language, for example:
* Case sensitiveness. I prefer case insensitivity.
* Uppercase keywords. Uppercasing keywords was form of manual syntax highlighting, however uppercase words reduce readability (try to read a software license with lots of capitals). Sincereadability of auto syntax highlighted code is so good nowadays, uppercase keywords are seriously outdated.
* Modula inspired modular programming system. Sorry Niklaus, but the UCSD Pascal units are way superior.
* While I like Pascal's natural language syntax, I have my doubts wether changing ^ to "POINTER TO" is an improvement.
* Explicit END keyword instead of begin/end. IMO a solution for a problem that doesn't exist in practise, and requires the introduction of an ugly ELSIF keyword.
* Real men do manual memory management. While nice in theory, garbage collection doesn't live up to its expectations and it limits interoperability with external libraries. Alas, with so few Oberon code in use, you depend a lot on external libraries and they require manual memory management.

Mirage
01-06-2007, 07:28 AM
Oberon by itself is good for games.
Modular architecture is better then OOP for as big systems as a game engine is.
Well-tought and strict language is also advantage - or do you like buggy games? It's a norm novadays.
Typical Oberon program is a set of modules for a host environment (e.g. BlackBox). In conjunction with the reflection system it's really powerful. No need in scripting system - just write a module and use efficient, fully-featured Oberon for scripting purposes.

Text attributes in BlackBox are often used to highlight semantics (manually), not syntax. And possiblity to insert a picture into source code is also a useful one (why I can't do this in Delphi or VS??).

Garbage collector is also very useful in most cases. If you want to manage memory by hands - just take a large piece of memory and manage it manually.
But existance of Active Oberon-based real time OS BlueBottle tells us that there is no need in manual memory management.:)

Concerning libraries - it's possible to work with COM objects from a BlackBox application.
For games even 3D-math library is often written from scratch. Nevertheless, there are libraries for Oberon:
http://www.zinnamturm.de/

Disadvantages (or why I still not at Oberon):
* very small community - recently the interest to Oberon is incresing but it's still small
* lack of ideal compilers - BlackBox is good but the code it generating is not very fast. Code generated by XDS is fast, but XDS doesn't have an IDE, not open source etc.
* lack of libraries

Bijo
01-06-2007, 11:54 AM
Disadvantages (or why I still not at Oberon):
* very small community - recently the interest to Oberon is incresing but it's still small
* lack of ideal compilers - BlackBox is good but the code it generating is not very fast. Code generated by XDS is fast, but XDS doesn't have an IDE, not open source etc.
* lack of libraries
http://www.excelsior-usa.com/xdsx86.html : it seems it does have an IDE.

Mirage
01-06-2007, 12:40 PM
Yes it does, a DOS-based IDE.:)
I mean modern IDE.

Bijo
01-06-2007, 05:37 PM
Here's a whole list of compilers: http://www.oberon.ws/TORS/compilers.html


Haven't tried 'em, but at least there's no lack of compilers :)

dmantione
01-06-2007, 06:53 PM
There are stacks of Pascal compilers, but only very few are production ready.

WILL
01-06-2007, 07:02 PM
As apposed to Object Pascal where there are only a handfull of them and all of them are production ready. :P

Psst, I think you meant to say Oberon-2 Daniel. ;)

dmantione
01-06-2007, 08:38 PM
No, I did mean Pascal, pointing out that even an arsenal of compilers (hundreds, perhaps over a thousand) does not mean a lot of good compilers. As said above, one of the most serious problems with Oberon-2 is the lack of mature compilers. A list of compilers doesn't change that.

WILL
01-06-2007, 08:41 PM
Well this is true. :)

Bijo
01-06-2007, 08:59 PM
If you're talking about that link I posted: it was not intended to show any mature compilers; just that there's no lack of compilers :)

There's another one called OBC: http://spivey.oriel.ox.ac.uk/mike/obc/
Have it installed, but have hardly tried it out. It looks promising though.

Anybody know anything about Component Pascal?

Robert Kosek
01-06-2007, 09:04 PM
Anybody know anything about Component Pascal?From what I found it is both ugly and unworthy of bearing the name "pascal". It is utterly incompatible with Object/Delphi Pascal to boot.

http://www.answers.com/topic/component-pascal?method=26&initiator=FFANS

Bijo
01-06-2007, 10:35 PM
Anybody know anything about Component Pascal?From what I found it is both ugly and unworthy of bearing the name "pascal". It is utterly incompatible with Object/Delphi Pascal to boot.

http://www.answers.com/topic/component-pascal?method=26&initiator=FFANS
Hmmm, I wouldn't say that myself, though.

From what I see it looks like a logical development of a language of long ago: (first ALGOL, then) Pascal, Object Pascal, Modula, Modula-2, Oberon, Oberon-2, Component Pascal (though it looks a lot like Oberon-2). That list looks like natural development in steps.

ALGOL is forgotten and Pascal took over, and after all these years it's Component Pascal that is the final language by Wirth (though I suspect it might evolve even more).

JSoftware
01-06-2007, 10:43 PM
I tried component pascal and didn't like it at all. It was very messy and I couldn't figure out what was going on.

Oberon is an interesting language. Especially the way class methods are declared. It is however sometimes a PITA I would suppose. I tried to get a bit into it yesterday but I failed miserably.

It was like coding some inbreed monster of Java and Visual Basic :cry: (Will, we need a puking smiley!)

pstudio
01-06-2007, 10:52 PM
Here's some puking smileys for you :)

http://smileys.on-my-web.com/repository/Disgusting/vomit-1.gif
http://smileys.on-my-web.com/repository/Disgusting/vomit-3.gif
http://smileys.on-my-web.com/repository/Disgusting/vomit-4.gif
http://smileys.on-my-web.com/repository/Disgusting/vomit-5.gif
http://smileys.on-my-web.com/repository/Disgusting/vomit-6.gif
http://smileys.on-my-web.com/repository/Disgusting/vomit.gif

Choose whichever you like ;)

WILL
02-06-2007, 04:29 AM
Object Pascal wasn't a creation of Wirth's. At least not the Object part. :)

In fact it was born out of Apple Computer back in the mid-80s. It was the language of choice for the first Macs. In fact the entire application structure for the Macs were based off the conventions of the early versions of the Object Pascal language. You might even say that the Windows architecture was inspired by the design of Object Pascal. :D (Notice how well the two play together in concept?)

But anyhow I'm getting off topic so read all about it here: Object Pascal on Wikipedia (http://en.wikipedia.org/wiki/Delphi_(programming_language))

It's a fairly accurate document. (Considering that any idiot that has an opinion on the matter can contribute. :P)

Bijo
02-06-2007, 07:27 AM
Yes it does, a DOS-based IDE.:)
I mean modern IDE.
Actually, what I see is a Windows IDE if you use Native XDS (http://www.excelsior-usa.com/xdsx86.html), and it says so on their site. It looks very poor, though... but if that thing's DOS-based then I'm an expert programmer guru :) I'm not interested in IDEs anyway so for me it doesn't really matter.

Too bad you can't -- or maybe it's possible -- to autolink after compiling (command-line). Is there a way? The XDS manual isn't very clear on it.

Bijo
03-06-2007, 02:25 PM
However, there are a few things that don't make it my favourite language, for example:
(...)
* Uppercase keywords. Uppercasing keywords was form of manual syntax highlighting, however uppercase words reduce readability (try to read a software license with lots of capitals). Sincereadability of auto syntax highlighted code is so good nowadays, uppercase keywords are seriously outdated.
(...)
* Explicit END keyword instead of begin/end. IMO a solution for a problem that doesn't exist in practise, and requires the introduction of an ugly ELSIF keyword.
(...)

* I've had a go at Modula-2 and in there you also need uppercase keywords. I don't like it. You should be able to choose between upper- and lowercase keywords when you feel like it.

But to address your point about auto syntax highlighting: from what I see many text editors that appear in common use don't support Oberon-2 out of the box. At best I've seen the ConTEXT website that had a user-made downloadable .chl file, but even this is flawed.

I personally like Notepad++ but it has no auto support for Oberon-2, and manually making one is just annoying (even if the language is small).

* I like the END principle and ELSEIF keyword. Maybe that's because I've been fooling around with other languages so much it's just common to me. The BEGIN keyword to me just looks unnecessary, unless it's the beginning of a program.


I personally would give Oberon-2 a try, and it looks like a natural modern development from the old Pascal and others. Reduction of the whole language to make it more advanced in syntax and easier in use. It would also mean no more annoying IF-THEN-ELSE confusion and BEGIN-END verbosity to me (as I automatically try to simulate ELSEIF one way or another).

The more I see from it, the more I want to use it! I don't like the IMPORT keyword though. I prefer the word USES.