Re: globals?



"Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
news:udcRsKhQHHA.3500@xxxxxxxxxxxxxxxxxxxxxxx

OOP is a tool, not a goal.

Actually VB is a tool not a religion. :-)

Re: your Sin() example:

In the latter case readability gets worse and the only way to make it
better is by importing the 'Math' class. In the case of the mathematical
functions it's absolutely irrelevant that the functions are members of a
certain class. Qualification by class name only blows up code and thus
reduces readability.

It is completely relevant if you use an alternative math library. It is
important for many to understand that not all software is like the software
that we personally produce. Nobody I know qualifies Sin() with Math they
import Math at the top. And again the reason is because one can import a
scientific math library in it's place and gain whatever benefit that might
have without changing the code below.

And as said by Tom, you make your code difficult to understand to non-vb
"players".

Does that really matter? There are so many things which are different in
various programming languages. You can also say that other programming
languages not providing the functionality VB provides make understinding
VB code hard to non-vb "players", which is certainly often the case in
practice. So that's only a POV.

Yes in the business world it matters very much. Confusion cost money.
Programmers are hired on a budget there isn't some infinite amount of money
available and it is common for the "VB-guy" to be asked to write non-VB code
and the C# guy to fill in when the VB-guy is sick or quits.

Please note my careful wording of the example in my post it isn't C# vs VB
it is the VB function library versus "every other dotnet language."
Striving to be different for no apparent benefit is the problem. Where a
funny hat if that is the VB-er's goal.

\\\
If s IsNot Nothing AndAlso s.Length > 0 Then
...
End If
///

if I can simply write

\\\
If Len(s) > 0 Then
...
End If
///

But that's the point isn't it. Import the Visual Basic namespace and do it
your way who said you couldn't? I only say you can't if you work for me.
If it becomes a major headache we can create our own class and implement
Len() as a function along with the 100 or so other things we find repetitive
and annoying. It is what we would do if we encountered something we needed
that wasn't currently in the framework or the VB namespace. That library
can be used by both the VB development team and the C-Sharp team.



.



Relevant Pages

  • Re: Hows dot.net doing nowadays?
    ... like terse programming languages, tend to write ... are often more at home with math as a language ... Well, I firmly belong in, and am comfortable with, the verbosity camp. ...
    (microsoft.public.vb.general.discussion)
  • Re: Hows dot.net doing nowadays?
    ... like terse programming languages, tend to write ... are often more at home with math as a language ... than they are with human languages.) ...
    (microsoft.public.vb.general.discussion)
  • Re: Which computer language program is best for undergrads?
    ... C and Java are both fairly good for doing math, ... and are IMO both decently good languages in general. ... But I don't really call this programming as I understand it. ... programming language to do conventional programming. ...
    (comp.programming)
  • Programming languages and math
    ... I was thinking about programming languages today and it occurred to me ... having them lead the development of computer science we got programming ... languages for math people. ...
    (comp.lang.forth)
  • Re: Ten Commandments (On Topic!)
    ... Kernighan & Pike assert that programming for personal use is one to two orders of magnitude faster than programming for someone else. ... First read in all the data, then crunch it with calls to netlib or other math packages, and finally write the results to a few files that you can view with an editor. ... Exception: make full use of fortran's variable-dimension bounds-checked arrays: these are safer, more flexible, more convenient,and more portable than arrays in other languages. ... Character and structure types are unnecessary when you stick to numerics. ...
    (comp.lang.fortran)

Quantcast