Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
Shian_Lee said...

try/catch is probably the best solution.

OK, we're in agreement here.

Shian_Lee said...

but it's not part of the Euphoria philosophy. it's not part of Euphoria at all. it's not simple. period.

Following your argument to the logical conclusion, Euphoria should be frozen in stone forever where it is, with only bug fixes.

Shian_Lee said...

why not in-line C code?

You are aware that Euphoria supports in-line assembly, right?

Shian_Lee said...

The idea of Euphoria is to be minimalist, readable and simple - so you'll be able to write reliable code, much more then C or Basic, therefore you don't really need error handler to wrap any block of code for just in case.

Could you find me a quote for that? I accept that's what you want it to be. But as far as I can find, that's not part of the stated Euphoria philosophy. What it does say is that it is:

  • Simpler than Basic
  • More powerful than C++
  • The language is flexible, powerful, and easy to learn.

Euphoria only doesn't claim to be minimal, only simpler. Then again, it also boasts that it's "More powerful than C++".

I don't see where the claim "you don't really need error handler to wrap any block of code for just in case" comes from. Rather, the ReadMe file says (emphasis added):

Euphoria v3.1 Readme said...

Euphoria provides extensive run-time error checking for: out-of-bounds subscripts, uninitialized variables, bad parameter values for library routines, illegal value assigned to a variable, and many more. If something goes wrong you'll get a full error message, with a call traceback and a listing of variable values. With other languages you'll typically get protection faults with useless dumps of machine registers and addresses.

At one time, Euphoria was competing against languages that "get protection faults with useless dumps of machine registers and addresses."

But that's not really the case anymore.

The name Euphoria is an acronym: "End User Programming with Hierarchical Objects for Robust Interpreted Applications".

Without some way of dealing with exceptions, I don't see how Euphoria can claim to be "robust".

Google said...

Robust: ...(of a process, system, organization, etc.) able to withstand or overcome adverse conditions.

Rather, by design Euphoria is fragile. It's exactly equivalent to a C program with ASSERT left on. And there's a reason people don't leave ASSERT in production code.

- David

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu