Comments (5)
Hi niucool,
Good question. I've thought of 3 different ways, when I was considering supporting error handling.
- VB style. On Error Goto/Resume;
It's the most retro VB style. But I don't think it's the best error handling paradigm for modern programming. - Structured Exception Handling. Try-Catch-Finally, Throw;
The common modern way. - Coroutine Based;
Well, Coroutine would be much more than an error handling facility only, it organizes a chunk of runnable code as a whole, and could run concurrently.
It's not difficult to simply support On Error statement, but the most important thing when introducing a new feature is that keep the consistency with not only exist features, but also future ones. So I might introduce concurrent facility before advanced error handling.
Regards
WRX.
from my_basic.
Thank you for your reply.
What I'm thinking is a little bit different from yours. Basic is Basic, it should be easy to use and easy to port, I'd like my original basic code run properly with the help of my-basic without change or only minor changes. If my-basic introduces exclusive features or syntax, I have to learn,and these code are hard to port to other interpreters.
As VB is the most popular basic solution now, it will be great if my-basic could be compatible with it.
Thanks,
niucool
from my_basic.
That's considerable, niucool. But I doubt how many VB users have a purpose porting VB code with "On Error ..." handling code to MY-BASIC code, since Microsoft only reserved the On Error statements for compatibility from VB6 to VB.NET, and it's recommended to use structured exception by MS as well. I'd prefer to abandon that feature because of MB is not derived from VB directly. So at least it's not going to be implemented recently. Whatever, I'll keep it on my TODO note for a consideration.
Best
WRX.
from my_basic.
Now it's possible to use Structured exception handling with MY-BASIC.
from my_basic.
SEH should be enough for most error handling cases. There won't be any more new features for v1.x. And it's still not sure whether the non-structured way will be introduced in the future.
from my_basic.
Related Issues (20)
- Add real/float symbol to distinguish between Integer
- Write data to file HOT 2
- negative numbers HOT 1
- Function Overloading HOT 2
- Select Case feature
- Vector Workflow HOT 1
- Very slow ops on Strings HOT 2
- Very slow FOR HOT 1
- Spaces on certain keywords? HOT 2
- Type results depends on quotes used HOT 2
- Skipping Iterator variable option HOT 1
- Class member variable default value issue
- Unicode Printing Issue HOT 5
- REM and ENDREM as comment blocks HOT 2
- Crash when setting larger array sizes
- Support functions with and without brackets
- mb_debug_count_stack_frames - undeclared 'l' HOT 1
- Memory leak ? HOT 3
- (Question) Preferred way to use print/input redirect with socket I/0 HOT 1
- Compile error for ESP32S3 in platformio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from my_basic.