Hello all,
If I have a class called "Foo," is there a preferred naming convention for
iterating through each Foo instance in a collection of Foos? I've seen
several different variations, even in the MSDN documentation:
#1:
For each Foo as Foo in Foos
...
Next Foo
This variation is direct, but a bit ambiguous since it's using the same name
for the Foo class and the Foo instance. (I know that the "Foo" in "Next
Foo" is optional -- I'm just including it for clarity.)
#2:
For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos
...
Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance
name. However, it seems a bit too "cutesy" for me.
#3:
For each f as Foo
...
Next f
This appears to be the C# convention, for better or worse. Terse and to the
point.
I tend to use the first variation, but wonder if this makes my code less
readable. Does anyone have a preference for any of these, or any other
variations? I don't want to start a religious war, but am curious about
whether there's a consistent "best practice." 48 1749
Hi Robert,
Shame about number 1. ;-)
I would say the only 'best practice' is don't give your variables the same
name as the class.
Is this a Foo which I see before me,
The handle toward my hand?
Come, let me clutch thee.
I have thee not, and yet I see thee still.
For you are the class not the object,
Or is it the other way round?
And now I'm all confused.
Everything else. I would say, is optional and as varied as you suggest,
and more.
For short pieces of code like a loop, the single letter can be good. I use
'c' for char loops, 'S' for simple string manipulation, 'F' for a Form in a
small Form utility routine, etc. Generally the scope will be small and the
variable used a lot.
For objects in general I use oDis and oDat. (is dat 'cos Oi'm Oirish,
maybe not). It's a habit with history and it's a pretty strong one - but I'm
re-evaluatiing it in .NET. It does have the advantage of using the same name
as the class.
I absolutely <hate> My anything - now <that's> cutesy.
But occasionally I use TheWidget or ThisWidget.
Regards,
Fergus
* "Robert Jacobson" <rj**********************@nospam.com> scripsit: If I have a class called "Foo," is there a preferred naming convention for iterating through each Foo instance in a collection of Foos? I've seen several different variations, even in the MSDN documentation:
#1: For each Foo as Foo in Foos ... Next Foo
This variation is direct, but a bit ambiguous since it's using the same name for the Foo class and the Foo instance. (I know that the "Foo" in "Next Foo" is optional -- I'm just including it for clarity.)
I think that's a really bad convention.
#2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance name. However, it seems a bit too "cutesy" for me.
Seems "nice" to me.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to the point.
The "quick" solution.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
LOL! You need to write a book on the Art and Poetry of VB. Now if only you
could come up with bawdy VB limericks. "There was a VB programmer from
Nantucket..."
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl...
[Snip] Is this a Foo which I see before me, The handle toward my hand? Come, let me clutch thee. I have thee not, and yet I see thee still.
For you are the class not the object, Or is it the other way round? And now I'm all confused.
Well, two votes against my typical practice. I'll see if I can live with
aFoo, or the C# variation. Habits are hard to break. <g>
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... * "Robert Jacobson" <rj**********************@nospam.com> scripsit: If I have a class called "Foo," is there a preferred naming convention
for iterating through each Foo instance in a collection of Foos? I've seen several different variations, even in the MSDN documentation:
#1: For each Foo as Foo in Foos ... Next Foo
This variation is direct, but a bit ambiguous since it's using the same
name for the Foo class and the Foo instance. (I know that the "Foo" in "Next Foo" is optional -- I'm just including it for clarity.)
I think that's a really bad convention.
#2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the
instance name. However, it seems a bit too "cutesy" for me.
Seems "nice" to me.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to
the point.
The "quick" solution.
-- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet>
"Robert Jacobson" <rj**********************@nospam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hello all,
If I have a class called "Foo," is there a preferred naming convention for iterating through each Foo instance in a collection of Foos? I've seen several different variations, even in the MSDN documentation:
#1: For each Foo as Foo in Foos ... Next Foo
This variation is direct, but a bit ambiguous since it's using the same name for the Foo class and the Foo instance. (I know that the "Foo" in "Next Foo" is optional -- I'm just including it for clarity.)
Yeah, not my favorite approach. Aids in confusion later.
#2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance name. However, it seems a bit too "cutesy" for me.
This is my choice.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to the point.
This works too, however, if we keep copying what they do in C#, it will only give them more reason
to think they are better than us...
I tend to use the first variation, but wonder if this makes my code less readable. Does anyone have a preference for any of these, or any other variations? I don't want to start a religious war, but am curious about whether there's a consistent "best practice."
Fergus, I would say the only 'best practice' is don't give your variables the
same name as the class.
Curious on where you came up with this idea? ;-)
As it seems to me to be the best practice! As the names should be
descriptive enough that the name & type can be used to determine its
meaning. If the type happens to be the most descriptive name then why not
use it?
In other words if I have a Person object, why not name the field person,
especially when I am dealing with a generic person or I am iterating a
collection of specialized (derived objects) people objects?
I don't have a single web link handy...
Just a thought
Jay
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl... Hi Robert,
Shame about number 1. ;-)
I would say the only 'best practice' is don't give your variables the
same name as the class.
Is this a Foo which I see before me, The handle toward my hand? Come, let me clutch thee. I have thee not, and yet I see thee still.
For you are the class not the object, Or is it the other way round? And now I'm all confused.
Everything else. I would say, is optional and as varied as you
suggest, and more.
For short pieces of code like a loop, the single letter can be good. I
use 'c' for char loops, 'S' for simple string manipulation, 'F' for a Form in
a small Form utility routine, etc. Generally the scope will be small and the variable used a lot.
For objects in general I use oDis and oDat. (is dat 'cos Oi'm Oirish, maybe not). It's a habit with history and it's a pretty strong one - but
I'm re-evaluatiing it in .NET. It does have the advantage of using the same
name as the class.
I absolutely <hate> My anything - now <that's> cutesy.
But occasionally I use TheWidget or ThisWidget.
Regards, Fergus
Robert, Does anyone have a preference for any of these, or any other variations?
I use a variation of #1:
For Each foo As Foo in Foos ... Next
Notice the lower case f in foo, I follow the .NET Design Guidelines for
Class Library Developers and all variables, fields & parameters are
camelCased.
Unless I have a more descriptive name I use the type name, as names should
be descriptive enough that the name & its type can be used to determine its
meaning. If the type happens to be most descriptive then that is the name I
use. On rare occasions will I use an abbreviations of the type, usually when
the type name is a reserved word, for example ch for Char, str for String.
Right now I don't have a specific link.
I don't want to start a religious war, but am curious about whether there's a consistent "best practice."
I don't think there is a best practice per se. I tend to feel as long as you
are consistent within your project, solution, team, enterprise. Remember the
variable you use is more then likely private to the method, so it really
doesn't matter, its there more for your & your teams readability.
Hope this helps
Jay
"Robert Jacobson" <rj**********************@nospam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hello all,
If I have a class called "Foo," is there a preferred naming convention for iterating through each Foo instance in a collection of Foos? I've seen several different variations, even in the MSDN documentation:
#1: For each Foo as Foo in Foos ... Next Foo
This variation is direct, but a bit ambiguous since it's using the same
name for the Foo class and the Foo instance. (I know that the "Foo" in "Next Foo" is optional -- I'm just including it for clarity.)
#2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance name. However, it seems a bit too "cutesy" for me.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to
the point.
I tend to use the first variation, but wonder if this makes my code less readable. Does anyone have a preference for any of these, or any other variations? I don't want to start a religious war, but am curious about whether there's a consistent "best practice."
Hi Robert,
When I see this, it reminds me on the first time I started with a database.
For each mare as horse in the stable
'bring it some water
next
I think that your program has to describe what you are doing that is the
first rule in all programming.
Cor
* "Rick Mogstad" <ri**@NOSPAM.computetosuit.com> scripsit: #2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance name. However, it seems a bit too "cutesy" for me.
This is my choice.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to the point.
This works too, however, if we keep copying what they do in C#, it will only give them more reason to think they are better than us...
I often used something like 'f' for loop variables very long time before
C# has been invented.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Robert Jacobson" <rj**********************@nospam.com> scripsit: LOL! You need to write a book on the Art and Poetry of VB. Now if only you could come up with bawdy VB limericks. "There was a VB programmer from Nantucket..."
ROFL
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: In other words if I have a Person object, why not name the field person, especially when I am dealing with a generic person or I am iterating a collection of specialized (derived objects) people objects?
It's harder to distinct between the call of a class method or an
instance method for the programmer who reads the code.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Good points, Jay. I tend to prefer Pascal casing for variables. (I had
thought that was the MS recommendation for VB.Net.... perhaps I'm wrong.)
However, your suggestion sounds like a nice compromise for distinguishing
between the instance foo and the class Foo.
All of this makes me nostalgic for the bad-old-days of Hungarian naming
conventions from Hell. <g>
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Robert, Does anyone have a preference for any of these, or any other variations? I use a variation of #1:
For Each foo As Foo in Foos ... Next
Notice the lower case f in foo, I follow the .NET Design Guidelines for Class Library Developers and all variables, fields & parameters are camelCased.
Unless I have a more descriptive name I use the type name, as names should be descriptive enough that the name & its type can be used to determine
its meaning. If the type happens to be most descriptive then that is the name
I use. On rare occasions will I use an abbreviations of the type, usually
when the type name is a reserved word, for example ch for Char, str for String.
Right now I don't have a specific link.
I don't want to start a religious war, but am curious about whether there's a consistent "best practice." I don't think there is a best practice per se. I tend to feel as long as
you are consistent within your project, solution, team, enterprise. Remember
the variable you use is more then likely private to the method, so it really doesn't matter, its there more for your & your teams readability.
Hope this helps Jay
"Robert Jacobson" <rj**********************@nospam.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Hello all,
If I have a class called "Foo," is there a preferred naming convention
for iterating through each Foo instance in a collection of Foos? I've seen several different variations, even in the MSDN documentation:
#1: For each Foo as Foo in Foos ... Next Foo
This variation is direct, but a bit ambiguous since it's using the same name for the Foo class and the Foo instance. (I know that the "Foo" in "Next Foo" is optional -- I'm just including it for clarity.)
#2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the
instance name. However, it seems a bit too "cutesy" for me.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to the point.
I tend to use the first variation, but wonder if this makes my code less readable. Does anyone have a preference for any of these, or any other variations? I don't want to start a religious war, but am curious about whether there's a consistent "best practice."
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl... * "Rick Mogstad" <ri**@NOSPAM.computetosuit.com> scripsit: #2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance name. However, it seems a bit too "cutesy" for me. This is my choice.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and to the point.
This works too, however, if we keep copying what they do in C#, it will only give them more
reason to think they are better than us...
I often used something like 'f' for loop variables very long time before C# has been invented.
ROFL. This was more of a joking statement than anything. There is almost no difference between
this and Example2 as far as Im concerned.
-- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet>
Herfried,
Yes that is the one downside!
However! if the compiler did not allow calling class members on variables,
then you could tell as the variable is camelCased while the class is
ProperCased.
Unfortunately VS.NET 'fixes' the names for you so they are all cased for the
variable...
Of course the above may have no bearing on reality.
That's my story and I'm sticking too it ;-)
Jay
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:en**************@TK2MSFTNGP09.phx.gbl... * "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: In other words if I have a Person object, why not name the field person, especially when I am dealing with a generic person or I am iterating a collection of specialized (derived objects) people objects?
It's harder to distinct between the call of a class method or an instance method for the programmer who reads the code.
-- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet>
Hi Jay,
|| > I would say the only 'best practice' is don't give your
|| > variables the same name as the class.
||
|| Curious on where you came up with this idea? ;-)
|| As it seems to me to be the best practice!
The 'I would' and the quotes around 'best practice' - it's all my own. ;-)
I don't like the idea of using the same name at all. I think there's a
case in C# for using the same name with a lowercase, but that's because it's
<not> the same name.
In VB I think it's folly. There's nothing but vigilance to prevent the
capitalisation being incorrect. Oops all of a sudden, which one is it supposed
to be? And either way, foo and Foo are the same to VB. What do you do when you
want a Shared member of Foo? What does Junior understand when s/he's reading
your code?
But perhaps you mean it's best practice in the same sort of context that I
use my 'c', 'S' and 'F' - small-scope, self-contained, many references? I'd
hate to read code in which a class name was a variable name throughout the
code, camel cased or not. [That camel casing makes me shudder is perhaps a
small factor there, lol].
With an oFoo As Foo here, and a MyBar As Bar there....
Here a TheFoo, there an aBar...
Everywhere a camel As Camel.
;-)
Regards,
Fergus
* "Rick Mogstad" <ri**@NOSPAM.computetosuit.com> scripsit: I often used something like 'f' for loop variables very long time before C# has been invented.
ROFL. This was more of a joking statement than anything. There is almost no difference between this and Example2 as far as Im concerned.
;-)
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Robert Jacobson" <rj**********************@nospam.com> scripsit: Good points, Jay. I tend to prefer Pascal casing for variables. (I had thought that was the MS recommendation for VB.Net.... perhaps I'm wrong.)
The VB.NET Runtime Library uses this convention and I like it much more
than the butt-ugly camel case convention. The names of parameters and
variables IMO do not matter at all, there should not be any problems
when using the Pascal case convention.
All of this makes me nostalgic for the bad-old-days of Hungarian naming conventions from Hell. <g>
I still like the Hungharian convention. It seems that the developers of
..NET looked at Java's bad naming conventions too much.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: Notice the lower case f in foo, I follow the .NET Design Guidelines for Class Library Developers and all variables, fields & parameters are camelCased.
IMO a really ugly convention. I will never use it.
SCNR
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Robert,
As I said I follow the .NET Design Guidelines, however they do not
specifically mention local variables (at least I am not seeing it right
now), I follow parameter & field conventions for local variables also.
Note for fields I prefix with m_, as VB.NET does not allow a camelCased
field to match a PascalCased Property.
Note when I said ProperCased I was using it as synonymous with PascalCased.
I know I've read way to many 'recommendations' to keep track of where I
found what where. So generally its what is in the Design Guidelines with a
handful of exceptions...
Hope this helps
Jay
"Robert Jacobson" <rj**********************@nospam.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl... Good points, Jay. I tend to prefer Pascal casing for variables. (I had thought that was the MS recommendation for VB.Net.... perhaps I'm wrong.) However, your suggestion sounds like a nice compromise for distinguishing between the instance foo and the class Foo.
All of this makes me nostalgic for the bad-old-days of Hungarian naming conventions from Hell. <g>
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl... Robert, Does anyone have a preference for any of these, or any other variations? I use a variation of #1:
For Each foo As Foo in Foos ... Next
Notice the lower case f in foo, I follow the .NET Design Guidelines for Class Library Developers and all variables, fields & parameters are camelCased.
Unless I have a more descriptive name I use the type name, as names
should be descriptive enough that the name & its type can be used to determine its meaning. If the type happens to be most descriptive then that is the
name I use. On rare occasions will I use an abbreviations of the type, usually when the type name is a reserved word, for example ch for Char, str for
String. Right now I don't have a specific link.
I don't want to start a religious war, but am curious about whether there's a consistent "best practice." I don't think there is a best practice per se. I tend to feel as long as
you are consistent within your project, solution, team, enterprise. Remember the variable you use is more then likely private to the method, so it really doesn't matter, its there more for your & your teams readability.
Hope this helps Jay
"Robert Jacobson" <rj**********************@nospam.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Hello all,
If I have a class called "Foo," is there a preferred naming convention for iterating through each Foo instance in a collection of Foos? I've
seen several different variations, even in the MSDN documentation:
#1: For each Foo as Foo in Foos ... Next Foo
This variation is direct, but a bit ambiguous since it's using the
same name for the Foo class and the Foo instance. (I know that the "Foo" in
"Next Foo" is optional -- I'm just including it for clarity.)
#2: For each MyFoo [or aFoo, TheFoo, etc.] as Foo in Foos ... Next MyFoo
This variation eliminates the ambiguity by adding a prefix to the instance name. However, it seems a bit too "cutesy" for me.
#3: For each f as Foo ... Next f
This appears to be the C# convention, for better or worse. Terse and
to the point.
I tend to use the first variation, but wonder if this makes my code
less readable. Does anyone have a preference for any of these, or any
other variations? I don't want to start a religious war, but am curious
about whether there's a consistent "best practice."
* "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: Yes that is the one downside!
However! if the compiler did not allow calling class members on variables, then you could tell as the variable is camelCased while the class is ProperCased.
ACK.
Unfortunately VS.NET 'fixes' the names for you so they are all cased for the variable...
IMO it _fortunately_ fixes them.
;-)
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi******@tesco.net> scripsit: That camel casing makes me shudder is perhaps a small factor there, lol
ACK. Camel case stands against every aesthetical and typographical principle.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi anyone,
|| What do you do when you
|| want a Shared member of Foo?
Doh!. Forget that one.
Fergus
Hi Jay, Herfried,
What do you mean 'fixes' the variables. Have I missed something handy? Is
it an option that I have switched off? Is it a VS2003 feature?
Regards,
Fergus
Hi Herfried,
But it's an officially recommended convention.
SCNR. ;-))
Regards,
Fergus
Hi Robert,
The day I discovered that it had been labelled 'Hungarian' notation I was
really pissed off. I was using that style for years before then. And they had
so many 'wrong' characters in the 'official' version, moan, moan.
I agree with Jay's suggestion - go your own way but be consistent.
(ish) lol.
Regards,
Fergus
Hi Cor,
ROFL. That's funny. ;-))
And a very good point, too.
Regards,
Fergus
* "Fergus Cooney" <fi******@tesco.net> scripsit: But it's an officially recommended convention.
ACK. But it doesn't matter if you don't use it. Using non-convention
compliant characters to markup quoted text, other people will have
problems reading the text.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi******@tesco.net> scripsit: What do you mean 'fixes' the variables. Have I missed something handy? Is it an option that I have switched off? Is it a VS2003 feature?
\\\
Dim foo As Foo
foo.Goo() ' foo is lower case!
..
..
..
Public Class Foo
Public Shared Sub Goo()
...
End Sub
End Class
///
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi Herfried,
Sorry, I haven't a clue what you're telling me there.
For me, what I type is what I get. Is this 'fixed' anything to do with
that?
Regards,
Fergus
Hi Herfried,
Lol. NACK, I think that other people won't (because they have human
intelligence) but apparently some newsreaders are so stupid and inflexibly
written that they <will>. ;-)
BTW. I went to gnus.org. How in the "F" & Path.InvalidPathChars & "k" am I
supposed to download and install it when they won't tell me what I need and
where to get it? It appears that the website is as cleverly designed as the
newsreader.
Regards,
Fergus
* "Fergus Cooney" <fi*****@post.com> scripsit: Sorry, I haven't a clue what you're telling me there.
For me, what I type is what I get. Is this 'fixed' anything to do with that?
If you name the method 'Foo' and the class' name is 'Foo', you will
not be able to distinct between a call to a class method and a call to
an instance variable.
Jay said that he names the variable lowercase ('foo'). He would expect
this code:
\\\
Dim foo As New Foo()
foo.InstanceMethod()
Foo.ClassMethod()
///
VS.NET changes the code to:
\\\
Dim foo As New Foo()
foo.InstanceMethod()
foo.ClassMethod()
///
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi*****@post.com> scripsit: Lol. NACK, I think that other people won't (because they have human intelligence) but apparently some newsreaders are so stupid and inflexibly written that they <will>. ;-)
It's impossible to write a better newsreader.
BTW. I went to gnus.org. How in the "F" & Path.InvalidPathChars & "k" am I supposed to download and install it when they won't tell me what I need and where to get it? It appears that the website is as cleverly designed as the newsreader.
It took me some hours to set this newsreader up but it works like a
charm.
;-)
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi Herfried,
VS.NET changes the code
Thanks, now I understand what you're talking about. :-)
So now the question becomes How? It doesn't happen for me. Is this one of
these prettify options?
Regards,
Fergus
Hi Herfreid,
Apparently it renders || as some sort of smiley. One of their users has
reported that he doesn't like that, but doesn't know how to change it.
Well, you recommended that I check it out but they put large hurdles in
the way, and you seem keen to be in the conspiracy of silent wizardry, so I'll
have to give it a miss.
Impossible to improve? I'll never know.
Regards,
Fergus
* "Fergus Cooney" <fi*****@post.com> scripsit: Apparently it renders || as some sort of smiley. One of their users has reported that he doesn't like that, but doesn't know how to change it.
Well, you recommended that I check it out but they put large hurdles in the way, and you seem keen to be in the conspiracy of silent wizardry, so I'll have to give it a miss.
If you don't have some days time now, don't try to get gnus to run.
;-)
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi*****@post.com> scripsit: VS.NET changes the code
Thanks, now I understand what you're talking about. :-)
So now the question becomes How? It doesn't happen for me. Is this one of these prettify options?
Which options are turned on in your IDE?
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi Herfried,
ROFL - You want the whole list?
Assuming you mean the TextEditor/Basic
I've got
Messify listing (reformatting) of code.
switched off.
That's the only one that refers to the actual code. The rest are tabs and
outlining, etc.
Regards,
Fergus
Herfried, Unfortunately VS.NET 'fixes' the names for you so they are all cased for
the variable... IMO it _fortunately_ fixes them.
Just remember that, the statement was in the context of naming fields the
same as the type.
Otherwise I totally agree, it is good that it changes them so they match.
Jay
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e5**************@TK2MSFTNGP12.phx.gbl... * "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: Yes that is the one downside!
However! if the compiler did not allow calling class members on
variables, then you could tell as the variable is camelCased while the class is ProperCased.
ACK.
Unfortunately VS.NET 'fixes' the names for you so they are all cased for
the variable...
IMO it _fortunately_ fixes them.
;-)
-- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet>
Hi Herfried,
Blimey, you're up late.
The time isn't the problem. The problem is that there is no information
about how to <get> the thing. A web site for a product that doesn't want
people to <have> the product!!
Regards,
Fergus
* "Fergus Cooney" <fi*****@post.com> scripsit: Blimey, you're up late.
;-)
The time isn't the problem. The problem is that there is no information about how to <get> the thing. A web site for a product that doesn't want people to <have> the product!!
That's why I mentioned that you will need some days to get gnus to run.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi*****@post.com> scripsit: ROFL - You want the whole list?
No, please not...
Assuming you mean the TextEditor/Basic
I've got Messify listing (reformatting) of code. switched off.
I have turned this option on...
That's the only one that refers to the actual code. The rest are tabs and outlining, etc.
I think the option "Messify listing (reformatting) of code" changes the casing.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: IMO it _fortunately_ fixes them. Just remember that, the statement was in the context of naming fields the same as the type.
It was a joke, I forgot to mention that. That's one reason why I would
not name a field the same as the type in VB.NET.
Otherwise I totally agree, it is good that it changes them so they match.
;-)
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi Herfried,
Case changing would be useful if only I didn't have to have the messify
bit. - Under certain circumstances, with its 'smart indenting', it makes the
Tab key go backwards. That makes it almost as clever as certain newsreaders.
(S, lol, CNR).
Ah well, I can live without it - I have a handy capitalise key macro.
Regards,
Fergus
Hi Herfried,
And, for some reason, you are unwilling to share that information. Hmm,
can't say I understand that, but never mind.
EOT
Regards,
Fergus
* "Fergus Cooney" <fi*****@post.com> scripsit: And, for some reason, you are unwilling to share that information. Hmm, can't say I understand that, but never mind.
1. It's OT here.
2. It would take some hours to do that.
EOT
EOT too.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi*****@post.com> scripsit: Case changing would be useful if only I didn't have to have the messify bit. - Under certain circumstances, with its 'smart indenting', it makes the Tab key go backwards. That makes it almost as clever as certain newsreaders. (S, lol, CNR).
Ah well, I can live without it - I have a handy capitalise key macro.
But you use ugly spaces when calling a method:
\\\
MyObject.Foo (1, 2, 3)
' ^
///
;-)
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi Herfried,
ROFL. I don't think my keyboard does ugly spaces - is there a special
shift-key combination or something?
Hey!! I've just figured it out!! [jumps up and down, all excited]
You're a German speaker.
I'm an English speaker.
You don't like spaces.
I love them.
You understand words like
ProgrammitkeinePlätzezwischenirgendeinemvondenWört er
I wouldn't have a clue what I was looking at
Regards,
Fergus
* "Fergus Cooney" <fi*****@post.com> scripsit: You understand words like ProgrammitkeinePlätzezwischenirgendeinemvondenWört er
Still ROFL.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: clintonG |
last post by:
Does the use of DTD, XML Schema and similar constructs adopt
the use of C# naming conventions? If so how do I make the distinction
of how to apply C# conventions with XML elements, attributes and...
|
by: Mark Broadbent |
last post by:
stupid question time again to most of you experts but this is something that
continually bothers me.
I am trying to get into the habit of naming variables and controls in an
assembly as per...
|
by: clintonG |
last post by:
Does the use of DTD, XML Schema and similar constructs adopt
the use of C# naming conventions? If so how do I make the distinction
of how to apply C# conventions with XML elements, attributes and...
|
by: rastaman |
last post by:
Hi all,
I know of the existence of Object Naming Conventions for Visual Basic 6.
Now I'm reading some books about VB .NET, but the names used for the
objects are button1, picturebox1, etc.
I...
|
by: Sturdy |
last post by:
Hi,
I'm new to C# and .NET. I'm a first time user of Visual C# 2005 Express and
have a very basic question. I've looked at several links and lots of docs but
can't find any tips on naming multiple...
|
by: Daz |
last post by:
Hi all!
This question may hopefully spark a little debate, but my problem is
this:
I am sure it's not just me who struggles to think up names for
variables. Obviously, thinking up a name...
|
by: Smithers |
last post by:
Is it common practise to begin the name of form classes with "frm" (e.g.,
frmOneForm, frmAnotherForm).
Or is that generally considered an outdated convention?
If not "frm" what is a common or...
|
by: psbasha |
last post by:
Hi,
I would like to know what naming conventions we can follow for the following types of variables/sequences :
Variables :
-------------
Integer
Float
Boolean
|
by: BillCo |
last post by:
I'm coming from a MS Access background and so I'm very used to and
comfortable with the hungarian (Leszynski et al) naming conventions.
However, I'm getting started into my first SQL Server...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |