Hi Chris,
for that where I need to work with SubStr() in VO, I'm not interested if the string is shorter than my requested length, or even is null.
Using the .NET method, either I have to check all conditions before I execute the method, or I have to deal with exceptions in every line.
In VO, normally I encapsulate an entire method in a begin/end sequence and have my globally defined errorblock doing the work, whereas in X# I have to deal with exceptions at every level.
Let me explain better: often I have code that is executed from both a Windows service and a GUI application. When there something fails, the errorblock of the calling program is called - regardless if an errorbox has to be popped up or an email has to been sent.
In .NET I have to define an interface that has at least a "ProcessException()" method, and when an error is occurring in the common code, I have to execute that code. IMHO this is much more and, even worse, much more complicated code.
Slowly I'm learning in how many places I have to deal with exceptions - and throwing exceptions slows down the program.
But since we are all programmers, we are nearly to lawyers (ask 5 lawyers about a legal question and you will receive at least 7 different answers) - so I don't expect you will agree.
Generally I have to say that I like it working with the .NET Framework - but the exception handling is the thing I absolutely don't like.
Wolfgang
X# or C#?
X# or C#?
Hi Wolfgang,
Oh, I misunderstood you, I thought you were talking about the TRY...CATCH block requiring a lot of code itself. Yeah, I agree about Substring() and similar methods, I also prefer VO's way which is more forgiving. Fortunately it is easy to overcome this, by defining methods that work the way we want them to. Regarding the global error handler, I have mixed opinions, I see both advantages and disadvantages the way VO does it. But it is certainly a very powerful feature of VO.
Oh, I misunderstood you, I thought you were talking about the TRY...CATCH block requiring a lot of code itself. Yeah, I agree about Substring() and similar methods, I also prefer VO's way which is more forgiving. Fortunately it is easy to overcome this, by defining methods that work the way we want them to. Regarding the global error handler, I have mixed opinions, I see both advantages and disadvantages the way VO does it. But it is certainly a very powerful feature of VO.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
X# or C#?
Hi Dick
I have attached a short pdf which may help to reconcile our views.
Terry
I have attached a short pdf which may help to reconcile our views.
Terry
- Attachments
-
- Net Approach.pdf
- (172.04 KiB) Downloaded 57 times
X# or C#?
Hello Terry,
I assume the chance that you left one out by error is close to 0
Dick
Thanks for the reconciliation. I am impressed with your ability to create those flowcharts with all aspects of the problem having their place.Terry wrote: I have attached a short pdf which may help to reconcile our views.
I assume the chance that you left one out by error is close to 0
Dick