Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strong vs weak typing
Message
From
17/03/2005 10:47:46
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00996662
Message ID:
00996811
Views:
18
Hi Einar,

>1. Even if the processors get faster users ask for more complicated things and they want their results faster. 1ms might not make a difference to a user but what if you could shave off 1ms every time you went through a loop 10000 times (now that would save the user 10s !!!)

Not sure what point you're trying to make here. From a theorectical point of view you're right. However from a pratical point of view it is different. For the average database application you won't see any significant difference in speed. Whether it is strong or weak typing. VFP is well known for it blazingly fast database handling and outperforms .NET datahandling on most aspects. VFPs rich language that makes it possible to do complex calculations/algoritms within on command makes issues with strong vs weak typing irrelevant.

As I said, if you've got to write a specific algorithm that does a lot of simple calculations (IOW that cannot be covered by the VFP complex functions), VFP is not best suited for best performance. You might need to write a little C/C++ DLL to do these kind of calculations if this is a relevant problem. If your whole application is filled with these requirements, VFP is simply not the best choice (Device drivers, math intensive tools).

>While we are on the subject of speed, I think strong typing allows the compiler to compile faster now that saves you the developer time.

I don't know how you get that idea. Strict typing in general takes a lot more time to compile than weak time languages as the compile has to do the type checking and possible optimizing datatypes into native code or interpretation code. BTW, VFPs compiler is the fastest I know. Compiling a 9MB project just under 3 seconds on a P4 2Ghz. I don't think many development tools would do much better than this. But I have to admit that this is not really caused by weak typing, but by the data drivenness of VFP.

>2. I love the fact that C# catches most of my silly mistakes at compile time. It takes a lot of resources fixing a bug that got into the run time compared to catching it in the compiler.

Personally I think compile time is way too late. It should give you hints when writing the source code.

>3. I have not heard about this. I find VFP's intellisense just as good as C#'s intellisense.

>My conclusion is:
>One you get used to strong typing you will love it and you will never want to go back to weak typing.

I've worked with strong typing before I worked with weak typing, and I definately love weak typing a lot more.

>Just the $0.02 of an ex-VFP'er (I realized that I was too young to stay with VFP until I retire)

Just the €0.02 of an ex-(turbo)Pascal and C/C++ programmer.

Walter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform