Coder Social home page Coder Social logo

Comments (5)

paladin-t avatar paladin-t commented on May 28, 2024

Hi niucool,

Good question. I've thought of 3 different ways, when I was considering supporting error handling.

  1. 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.
  2. Structured Exception Handling. Try-Catch-Finally, Throw;
    The common modern way.
  3. 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.

niucool avatar niucool commented on May 28, 2024

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.

paladin-t avatar paladin-t commented on May 28, 2024

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.

paladin-t avatar paladin-t commented on May 28, 2024

Now it's possible to use Structured exception handling with MY-BASIC.

from my_basic.

paladin-t avatar paladin-t commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.