|
Chris Maunder wrote:
It's so much harder to mismatch end braces
But you know about the Ctrl-E keycombination?
Why should the poor human that I am do such a typical computers job?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Ctrl-E doesn't work in notepad
cheers,
Chris Maunder
|
|
|
|
|
So don't write code in notepad, at least get SciTE or something.
In fact, VB will be worse off in notepad, since 1. it's a lot easier to mistype the sentence fragments that it requires than braces, and 2. it's just as hard to match the beginnings and endings of blocks, in fact with proper indentation, C is probably better because you only have to read a single symbol.
This is a pretty shallow thing to complain about anyway, I mean it doesn't really affect program structure or code speed. It's just a matter of memorizing one method and working with it.
(sorry, I'm too lazy to log on)
|
|
|
|
|
Anonymous wrote:
This is a pretty shallow thing to complain about anyway
OK - let's go way back in time to the beginning of this thread:
<wavy dream sequence>
I was about to complain about the VB syntax and how you have to end an if statement with End If, and a subroutine with End Sub.
Allow me to backflip in the middle of a post.
I actually like this. It's so much harder to mismatch end braces.
There's absolutely nothing wrong with C curly braces. They are one of God's little creatures and thus are Good. It's just that I was about to bag out VB syntax and then realised that I didn't actually hate it as much as I thought. Maybe I need to attend VB anonymous.
"Hi, my name is Chris and I write VBScript"
cheers,
Chris Maunder
|
|
|
|
|
I can't tell you how many times I have been looking through a developers C++ code and seen this way at the end of a group of nested statements:
}
}
}
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
|
|
|
|
|
BASIC was since the beginning a lot easier to start with then C++, but C++ is more powerfull. So is VB.NET easier to start with, but C# will be more powerfull when you want something special.
Still I think that VB is just as good as C# with or without the weird braces and curly thingies
I hope they will keep this language in the future
|
|
|
|
|
The mighty-thewed C++ programmer disdainfully whacked the backside of the sniveling VB user at his feet with his broadsword.
"Get on ye," he growled, "methinks thy blood isn't fit to foul my blade."
Software Zen: delete this;
|
|
|
|
|
sssh. There are VB programmers here in our office
"delete this", I used this once on a thread class that deletes itself after its thread function terminates.
|
|
|
|
|
Uh, Stormwind, you say you've actually used "delete this;" in your code once. Could you send me that code please? I'd like to have a look at it. I can guarantee you that I won't give it anywhere else, if that makes you feel better.
Please mail your reply to binarybandit@operamail.com .
Regards,
Vikram.
Do not put off until runtime what you can do at compile-time.
|
|
|
|
|
Anyone's who's ever had to write a COM server in C++ from scratch will undoubtedly have used "delete this". It's how COM objects self destruct when Release reaches a ref-count of 0. Just remember not to access any of the class's member variables afterwards, or boom!
Regards,
Alvaro
The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. -- Albert Einstein
|
|
|
|
|
Alvaro Mendez wrote:
Anyone's who's ever had to write a COM server in C++ from scratch will undoubtedly have used "delete this".
Whoa ! I'm a just 19-year old student. I'm quite strong in C and C++, but as far as Win32 SDK and MFC are concerned, I consider myself a novice.
Alvaro Mendez wrote:
Just remember not to access any of the class's member variables afterwards, or boom!
That part I can understand.
About that code of yours ...
Regards and thanks,
Vikram.
Do not put off until runtime what you can do at compile-time.
|
|
|
|
|
I've used this in my in-place editors inside my grid control. Works like a dream.
cheers,
Chris Maunder
|
|
|
|
|
Thanks, Chris!
I'm checking out your article right now.
Regards,
Vikram.
Do not put off until runtime what you can do at compile-time.
|
|
|
|
|
I occasionally use VB, either because i need to prototype a GUI quickly, or because i need to write some ASP(not net) code. Although many things about the language anger and frustrate me, i can't deny it does what it aims to do - you can throw together programs quickly, and with few critical problems. Sure, they'll then be difficult to maintain, extend, or reuse effectively, but hey - that wasn't the point. If you take the time, you *can* write maintainable, extensible, reusable VB code, but then again, you can hammer in nails with your fist too if that's your thing.
Now, VB.NET has revamped some major portions of the language, and i could actually see a nicely planned and designed piece of software being fairly painless to write in it, while still not being sh*t two years (or heck, 6 months...) later.
But, so what? So does C++, so does Java, so does C#, so does... you get my point - if this is what you wanted, you already had it, sans VB. No doubt there are one or two hardcore souls out there who have been doing serious programming with VB for years, and who'll embrace VB.NET with open arms and dewy eyes... But for the "throw the controls on the form, double-click, type in all code in event handler" user, what does VB.NET add, beyond an annoying conversion and a new development environment?
My prediction: 5 years from now, VB6 will still be used for older code, VB.NET will be used for newer code, but used in the same careless way VB6 was. The serious VBers will have gradually moved to C# (cursing semicolons all the way no doubt), and will probably be happer for it, though asserting all that is good in C# came from VB.
I'll be sitting and drinking gin someplace, and wondering why i ever cared...
shog
nine
Ever since i heard the voice
i thought i had no choice...
|
|
|
|
|
"Sure, they'll then be difficult to maintain, extend, or reuse effectively, but hey - that wasn't the point. If you take the time, you *can* write maintainable, extensible, reusable VB code, but then again, you can hammer in nails with your fist too if that's your thing."
They are only difficult to maintain/extend/reuse if written by bad programmers. Bad programmers will be bad programmers no matter what tools they choose. If someone blames the tool, then he is most likely a bad programmer. VB itself does not produce bad programmers, but you may be able to say that it allows even a bad programmer to get something done!
"But for the "throw the controls on the form, double-click, type in all code in event handler" user, ..."
C# allows a user to do the same, besides the character C in its name and the syntax, there is really no big difference between C# and VB.NET. You will probably blame VB for a lot of bad C# programmers in the future.
|
|
|
|
|
You will probably blame VB for a lot of bad C# programmers in the future
This is true.. I blame it now. In my opinion C# and VB are one of the same.. the sig tells it all.
IMHO C++ is one of the only languages that one should absouluty learn. Not that I don't think you should learn other launguages and tools, for example I am proffecient in Perl. Sure C++ has a steep learning curve, I have been learning it for two years now, and I still can't create any great wizbang applications without a lot of work.. but at the same time my knowledge of C++ allows me to write for Win32, Linux, and I have even written a few apps for BeOS. I can create some pretty stunning apps in Windows.. It just takes me a while (part of that is poor math skills though.. my fault.. not the language). I just got done creating a small media player for win and ported it over to my Linux box running X with releative ease.. try and do that with C# or VB!
C# a poor attempt at bringing C++ to the VB masses
|
|
|
|
|
Picture Hanger wrote:
They are only difficult to maintain/extend/reuse if written by bad programmers.
Bullshit. Not that bad programmers won't produce bad code in whatever language/environment they adopt... But where is it written that all programs must be maintainable/extensible/reusable? Once-off hammer-it-out-and-never-touch-it-again prototypes and demos certainly have their places, and VB works nicely for these.
Picture Hanger wrote:
If someone blames the tool, then he is most likely a bad programmer.
Sure, sure... And i suppose only a bad golfer would blame the ball, right? Let's set Tiger Woods up with some wiffle balls before his next game...
Picture Hanger wrote:
C# allows a user to do the same, besides the character C in its name and the syntax, there is really no big difference between C# and VB.NET.
Gee, and i thought i'd have to ask for volunteers to prove my predictions acurate...
shog
nine
Ever since i heard the voice
i thought i had no choice...
|
|
|
|
|
vb stopped being a language with .net... it became a syntax like every other "language" in .net. The only real languages in .net are IL and C++.
|
|
|
|
|
aren't all "languages" just syntax? isn't the only "real language" machine code?
Ender_JC
P.S. I do however see you point.
|
|
|
|
|
Shog9 wrote:
I occasionally use VB,
I think you have incriminated yourself enough in your first four words.
Now how can anyone take anything else in your post seriously ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I'm guessing the concept of a 2 hour movie showing two guys eating a meal and talking struck them as 'foreign'
Rob Manderson wrote:
|
|
|
|
|
Colin Davies wrote:
Now how can anyone take anything else in your post seriously ?
People were taking my posts seriously?
shog
nine
Ever since i heard the voice
i thought i had no choice...
|
|
|
|
|
Shog9 wrote:
People were taking my posts seriously?
I don't take anything anyone posts here on CP seriously, least of all anything you post;P
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Shog9 wrote:
People were taking my posts seriously?
THe problem is that you shouldn't usually take Colin's posts too seriously.
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
All well said Shog. Sane stuff in an insane issue.
Shog9 wrote:
cursing semicolons all the way no doubt
Funny but I now curse End XXX syntax since having started using C#. What that chap up above said about ; and {} is grudgingly true.
I 'ave seen the light with {} and ;
Shog9 wrote:
I'll be sitting and drinking gin someplace, and wondering why i ever cared...
Amen brother!
Though I have to say that why we care right now is beyond me.
Shog9 wrote:
The serious VBers will have gradually moved to C#
I hope you are wrong there and that "gradual" is replaced by "swift".
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
Want a job?
|
|
|
|
|
Paul Watson wrote:
I hope you are wrong there and that "gradual" is replaced by "swift".
Well... there's "serious" and then there's "wild-eyed fanatic"...
Paul Watson wrote:
What that chap up above said about ; and {} is grudgingly true.
Indeed! I've tried to explain this before, and never quite managed. I remember the first time i saw a code listing in C, and though unfamiliar with the syntax, was able to recognize at a glance the structure, without resorting to scanning it line-by-line as i'd been accustom to with BASIC and Pascal.
shog
nine
Ever since i heard the voice
i thought i had no choice...
|
|
|
|
|