If this is your first visit, be sure to check out the FAQ by clicking the link above. You have to register before you can post.

If you have recently signed up, please make sure you log in so that your activity is registered. This is required for automatic promotions to work and to ensure your account is not deleted during the registration process.

AthenaOfDelphi

Moderation Process Reminder

Since this appears to be a problem, please be aware that some areas of the site are moderated. When you post to these areas, you will be told that your post is awaiting moderation.

You will not be able to see posts that you have made that are waiting to be moderated.

Do not think that because your post has not appeared that an error has occurred. If this happens an error message will be displayed (you should note this and report it in the 'Site News/Feedback' forum.

Go-flavored Pascal: now with Raylib bindings

By replacing the heavyweight Delphi-style OOP with a much simpler method/interface model inspired by Go, I have written an extremely compact (~10000 lines) self-hosting Pascal compiler for Windows. It can be viewed as an implementation of Russ Cox's thought:

"If I could export one feature of Go into other languages, it would be interfaces."

The compiler directly emits native x86 code and doesn't require any external assembler or linker. It can be easily embedded into larger software systems and used for educational purposes, e.g., as a playground for language design amateurs.

Integration with the Raylib 2D/3D game development library has become the first sign of maturity for my compiler.

I've seen the compiler posted on reddit, it is impressive in its own right. What would you say is so useful in interfaces in pascal? what do they make better?

If compared to the original, non-OOP Pascal, interfaces provide virtual functions. If compared to OOP versions of Pascal like Delphi or FPC, interfaces are much simpler yet almost as powerful as the inheritance-based OOP model.