Re: Try/Catch
- Posted by dcuny Feb 11, 2015
- 4672 views
According to your explanation of Try/Catch syntax and behaviour - it has no place in Euphoria - it behaves like 'stoned goto'.
try/catch defines the scope of an exception handler. If an exception is thrown within the scope of an catch clause, it stops executing code (because that would lead to incorrect behavior), and jumps to the handler.
There's nothing "stoned" about this.
Spock's smart error code which is available to the caller is the real thing. I would say that using only functions for retrieving the smart error code is even more mature. No need to wrap the whole program/plug-in with error handler. If it's that bad - then get rid of it.
The "smart error code" only works for a limited set of exceptions, ignores the most common cases, and continues to run code when Euphoria knows that the results will be wrong.
Since incorrect indexes are the most common exception in Euphoria, you're suggesting that we adopt a solution known to leave the majority of use cases in place.
Then what you are suggesting is to take Euphoria (Mosquito-weight) and compete against C++ or Java (Very-Heavy-weight) - for what? for rewriting Firefox? for reinventing the wheel?
The argument that Euphoria is minimal is your own conclusion.
The claim is that Euphoria is also "More powerful that C++". That "power" doesn't come from having less than C++.
Euphoria users don't need that 'goto under L.S.D' called 'Try/Catch' - a simple error code available to the caller is enough for the scale and weight of Euphoria.
Except that it doesn't catch the vast majority of exceptions.
Why claim that it behaves like "goto under L.S.D.". Please offer some sort of support for this, because I don't see it. Rather, it behaves in a structured, reliable manner when an exception is thrown.
No - I don't want Euphoria to be frozen on stone (which is almost is) - I want to revive it. But apparently Euphoria is not going to be simple anymore. And not fun. If it will be at all, since OpenEuphoria strategy is dreamy.
The mindset that Euphoria had to be minimalist is what caused a great many power users - like myself - to abandon it.
I was so frustrated with the glacial pace of Euphoria that I even wrote my own version in C from scratch.
If you want all options to be available in Euphoria - then just use some multi-million $ language. Why waste your time? Tell your costumers that we are living in "modern" time, and that they have to adopt themselves to Java, advs, viruses and fat.
"More powerful than C++"
And we are living in "modern" times.
Come on, are you going to wait till stable version 4.5 will be out? Euphoria has no money. face it and move on. there are so many languages out there.
So you're literally telling me to leave?
- David