Although the language was created more than 60 years ago, it has evolved a lot since then and today COBOL can be just as capable as other modern object oriented languages. The latest 2023 standard supports advanced object oriented features andasynchronous messaging, making it just as powerful for backend development as C# and Java!
I know that some developers might disagree with how useful object oriented COBOL is, but in reality, there are certain things that are difficult, if not impossible to express well in procedural only code. An example of this is a generic class withoverloaded methods, attempting to express that in procedural code would require a ton of unnecessary code duplication, which is specially bad considering that the language already supports generic classes and overloaded methods just like C# and Java.
But unlike C# and Java, it's not as easy to use COBOL's more advanced features without freely accessible teaching resources for those, but also the compiler frontend infrastructure needed to display useful and readable error messages for these features.error messages, and both the Errata NuGet package and Ariadne Rust crate.
Because of that, we made a new modern error message system for Otterkit, which should still display useful information to experienced developers, while also being easy to read and understand for new developers. This new format was inspired by Rust's
Otterkit's frontend is built using a handwritten recursive descent parser (which is the industry standard for production-level compilers), this allows us very precise control over exactly where and when to display an error, and also the exact errormessage that it should display to the developer.
Below is an example of how these errors look like with the new error message system:the "Note" part is optional, and the error message can still work without it:
https://i.imgur.com/z99Wq3V.png
We're looking for feedback on both the format and the contents of the error messages, as well as help writing more of these to provide useful error messages to users.
The new error message system is modular, and allows us to add or remove parts of the message as needed for different scenarios, it also allows us to expand the format by implementing more parts in the future that can be composed together. Currently,
https://i.imgur.com/5v9QVF5.png
Same error message, but without the Note.
We'll start replacing our previous error messages with new ones that take advantage of the new system soon! This should hopefully help the overall COBOL development experience, and should help new developers learn COBOL more easily.
Note: Otterkit is still in prerelease and is not yet complete, any feedback is welcome. We're looking to improve the COBOL ecosystem and we hope COBOL developers also agree with the need to modernize through open source and freely accessible tooling.
https://github.com/otterkit/otterkit
On 3/24/2023 1:43 PM, KTSnowy (The Web Dev Fox) wrote:asynchronous messaging, making it just as powerful for backend development as C# and Java!
Although the language was created more than 60 years ago, it has evolved a lot since then and today COBOL can be just as capable as other modern object oriented languages. The latest 2023 standard supports advanced object oriented features and
overloaded methods, attempting to express that in procedural code would require a ton of unnecessary code duplication, which is specially bad considering that the language already supports generic classes and overloaded methods just like C# and Java.I know that some developers might disagree with how useful object oriented COBOL is, but in reality, there are certain things that are difficult, if not impossible to express well in procedural only code. An example of this is a generic class with
features.But unlike C# and Java, it's not as easy to use COBOL's more advanced features without freely accessible teaching resources for those, but also the compiler frontend infrastructure needed to display useful and readable error messages for these
error messages, and both the Errata NuGet package and Ariadne Rust crate.Because of that, we made a new modern error message system for Otterkit, which should still display useful information to experienced developers, while also being easy to read and understand for new developers. This new format was inspired by Rust's
message that it should display to the developer.Otterkit's frontend is built using a handwritten recursive descent parser (which is the industry standard for production-level compilers), this allows us very precise control over exactly where and when to display an error, and also the exact error
the "Note" part is optional, and the error message can still work without it:Below is an example of how these errors look like with the new error message system:
https://i.imgur.com/z99Wq3V.png
We're looking for feedback on both the format and the contents of the error messages, as well as help writing more of these to provide useful error messages to users.
The new error message system is modular, and allows us to add or remove parts of the message as needed for different scenarios, it also allows us to expand the format by implementing more parts in the future that can be composed together. Currently,
https://i.imgur.com/5v9QVF5.png
Same error message, but without the Note.
We'll start replacing our previous error messages with new ones that take advantage of the new system soon! This should hopefully help the overall COBOL development experience, and should help new developers learn COBOL more easily.
Note: Otterkit is still in prerelease and is not yet complete, any feedback is welcome. We're looking to improve the COBOL ecosystem and we hope COBOL developers also agree with the need to modernize through open source and freely accessible tooling.
https://github.com/otterkit/otterkitI very much like the proposed error message format and layout. When I
can find some time I intend to poke around with your Otterkit prerelease compiler and look forward to driving it around...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 153:29:29 |
Calls: | 10,383 |
Files: | 14,054 |
Messages: | 6,417,840 |