Re: Include Statement



Comments interspersed below:


"Mike" <unknown@xxxxxxxxxx> wrote in message news:OsMai8czJHA.1420@xxxxxxxxxxxxxxxxxxxxxxx
Family Tree Mike wrote:

Of course it is not obvious from what I wrote, that I have experience with include statements. Suffice to say, I do. I'm one of the few guys who can read Fortran IV here.

You can *include" me as well. :-)

You seem to be of the opinion that because you used it elsewhere, that it should be useful here in VB.Net. I'm just saying that it is not readily apparent what adding an include statement to the syntax set adds.

For the same reason conditional compilation directives were added to compile a block vs not to compile a block.

For the same reason you have IMPORTS to reference an compiled object.



Just so it is clear, the imports statement allows you to shortcut a fully
quallified class name, so that you may use Form as opposed to
System.Windows.Forms.Form.


> I'm not closed minded on the use of includes. You just have not
> stated your point of view very well, yet.

Fair enough.

First, single sourcing is very important concept. Currently under the IDE, to ADD "Existing Item" it makes a copy. It would preferred to have some method within the main project file to say



That is why "Add as link" is often prefered.



IMPORTS "FQDN source code" as oppose to assembly namespace

or just use well known traditional concept of #include, after all VB.NET is really sprinkled with these related ideas.

I have thousands, millions of line of code under my belt. Sometimes I will do:

#include "mylib.h"

to link in a "reference" (object) or maybe I might just do:

#include "mylib.cpp"



I would have added mylib.cpp to the makefile.



to burn it all in. The same idea can apply in VB.NET which is being molded to be more attractive to people like myself by sprinkling it with "common language" concepts.

Second, it is difficult to explain all the reason because they are VAST, every programmer has their reasons. Like without out product line source codes, look at other large projects where the source code is LOADED with both imports and includes - because the language allowed it.

#include "mylib.h" <-- akin to INTERFACE file
#include "mylib2.cpp" <-- akin to project File
#prama comment(lib,"mylib3.lib") <-- akin to IMPORTS

Thirds, I use alot of compiler #define statements or as it would be in VB.NET, #const and including in on a single or more files, would be a godsend.

Forth, personally, I program mostly via the console with my power programming editor of nearly 30 years - qedit. I have tons of code snippnets that I generally create and save include like a puzzle. I don't need this to be .NET dlls in only to use it. I have created some basic VB.NET classes and right now I needed to add it (the include files) to the VBC options setup in my F9 compiler action. A simple #include would be very useful here.

So maybe that doesn't explain it the "reasons" fully that is only understood by those who are active with these concepts, but honestly, that is really besides the point here. What is more disconcerting is the attitude that this or that is not needed, useful. I *hate* people say such things. :-)

--

Needed means that it is required for without it, you cannot accomplish a task.
To me, what you describe does not meet the "needed" mark. You may
have shown it useful in certain cases. It has to be weighed against
maintainable code. That remains to be seen.

--
Mike

.



Relevant Pages

  • Re: Include Statement
    ... For the same reason conditional compilation directives were added to compile a block vs not to compile a block. ... Second, it is difficult to explain all the reason because they are VAST, every programmer has their reasons. ... Like without out product line source codes, look at other large projects where the source code is LOADED with both imports and includes - because the language allowed it. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: C-programmer needs Forth advice
    ... I have no idea what your "guarantee compile order" ... the clueless programmer would scratch their head and actually *read* the code and understand the conventions being used. ... top of each of the functions that is called, set a breakpoint, and set one at the end. ... Your comment about not having source code and third-party functions also doesn't make sense. ...
    (comp.lang.forth)
  • Re: Cobol: Maximum number of FD Statements
    ... Subject: Cobol: Maximum number of FD Statements ... Programmer Analyst | Programmeur-analyste ... Human Resources and Skills Development Canada | Ressources humaines et ... Sounds more like a compiler problem than a compile problem. ...
    (bit.listserv.ibm-main)
  • Re: Cobol: Maximum number of FD Statements
    ... Human Resources and Skills Development Canada | Ressources humaines et Développement des compétences Canada ... Subject: Cobol: Maximum number of FD Statements ... Programmer Analyst | Programmeur-analyste CPP/ OAS/ IA Production ... Sounds more like a compiler problem than a compile problem. ...
    (bit.listserv.ibm-main)
  • Re: Print error alerts
    ... I tried to compile the code, ... I Ran you command: vbc ... 'Imports' statements must precede any declarations. ...
    (microsoft.public.backoffice.smallbiz2000)

Loading