Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Is Visual Basic a Good Beginner's Language? 1100

Austin Milbarge asks: "Ever since the .NET framework came along a few years ago, Microsoft had promised VB developers that their language would finally be taken seriously. To be honest, I never understood why some non-VB developers thought of VB as a 'toy' language, but that is for another article. Anyways, Microsoft made good on their promise and transformed VB from an easy to learn language into an object oriented power house, with lots of OOP functionality thrown in. The old VB has been discontinued, and the new VB is no longer a simple language. With all the fancy changes, is VB still the great beginner's language it once was? Would you recommend it to a beginner over C#?"
This discussion has been archived. No new comments can be posted.

Is Visual Basic a Good Beginner's Language?

Comments Filter:
  • My experience (Score:1, Informative)

    by Anonymous Coward on Tuesday March 07, 2006 @05:44PM (#14869950)
    In my experience, no it is absolutely not. In my experience with freshman-level college programming courses, I actually find that the people with Visual Basic experience actually experience greater difficulty than the people with no programming experience at all. Persons who have used some language other than the one the course is targeted at essentially understand how to program, and simply must learn the new language. Persons who have used no language do not know how to program, and must learn. But persons who have used visual basic have a wrong idea of how to program, and must un-learn it, then learn what is right.
  • Free Pascal (Score:4, Informative)

    by ROBOKATZ ( 211768 ) on Tuesday March 07, 2006 @05:54PM (#14870064)
    I'd recommend checking out Free Pascal [freepascal.org] and the Lazarus IDE [freepascal.org]. These are based on Borland Delphi, of which I believe you can also download a free version, but these are open source and available on many platforms. The Borland products run only on Windows or Linux with KDE (using QT), the Free Pascal libraries use GTK+.

    Object Pascal is a good language for beginners. It has strong typing and object-oriented features, but the typing isn't strict to the point of being obnoxious like in Java. It is lower level, so you will deal some with pointers and memory management but it is harder to make a mess with than C/C++. You can also visually design the UI of your application, but the language isn't a disaster like VB (and doesn't run in a VM like C# or Java, so it's quick).

  • Edsgar Dijkstra (Score:1, Informative)

    by 26reverse ( 305980 ) on Tuesday March 07, 2006 @06:01PM (#14870139)
    "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration". -- Edsgar Dijkstra (and if you don't know who that is.... stop calling yourself a programmer)

    For other possibilites: I'll suggest Ruby. Not because it's a great language (all have their own issues) but specifically because of this "Poignant Guide"
    http://poignantguide.net/ruby/ [poignantguide.net]. I found it a wonderful way of approaching programming from a very NON-technical manner... not just that it's amusing (the author has the same off-beat humor as myself), but because it relates common Object Oriented concepts to real world examples better than I've ever seen before (specifically the whole section on English grammer: verbs, nouns, adjectives becoming methods, objects and attributes).

    Don't think of the anti-VB sentiment as "throwing the baby out with the bathwater" think of it as "no matter how pretty the architecture... if the foundation is crap, the building will fall".
  • Comment removed (Score:5, Informative)

    by account_deleted ( 4530225 ) on Tuesday March 07, 2006 @06:10PM (#14870229)
    Comment removed based on user account deletion
  • Re:Bad idea (Score:2, Informative)

    by AKAImBatman ( 238306 ) * <akaimbatman@gmaYEATSil.com minus poet> on Tuesday March 07, 2006 @06:47PM (#14870539) Homepage Journal
    The first thing that I do is turn on "Option Explicit" and "Option Strict" in VB.NET. Typed varibles are enforced

    And how will a new programmer understand how to use that option, why it should be on, or even what it does? If you've got them in a classroom, you can force all the machines to be configured that way, but how much of their education will consist of them screwing around at home?

    Not to mention the fact that newbies can be dangerously clever. If their program doesn't compile, they're going to work hard to make it compile. At some point they might start fiddling with compiler options. (*Shiver* I remember doing stuff like that. Not a good idea.) Once they figure out that turning off that option makes their programs compile (and run flawlessly!), they'll take it to heart that they always need to do that. They *might* read up on what the switch does, but since they don't understand it, they'll assume it's an "Experts Only" thing and keep it off.

    Before you know it, all your classroom machines will have their settings reversed. Oi Vey!

    Also don't think that what you consider to be the pinnacle of all languages to be the easiet for someone else to learn.

    I actually recommend BASIC (the real thing) to start off with. See my other posts in this topic for more info. :-)
  • Comment removed (Score:3, Informative)

    by account_deleted ( 4530225 ) on Tuesday March 07, 2006 @06:49PM (#14870551)
    Comment removed based on user account deletion
  • by Bogtha ( 906264 ) on Tuesday March 07, 2006 @07:07PM (#14870715)

    VisualBasic 1.0 was most certainly Windows, I belive you are thinking of QuickBasic.

    No, there was such a thing as Visual Basic for DOS. I wouldn't blame you for repressing any memory you have of it :). It's mentioned in this Microsoft Knowledge Base article [microsoft.com] about preparing Visual Basic applications for Y2K. I quote:

    For all versions of Visual Basic for Windows (including its predecessors such as Visual Basic for DOS and QuickBasic) prior to and including 3.0, two-digit years were always assumed to be in the 1900s.

  • Re:Why not both? (Score:5, Informative)

    by anomalous cohort ( 704239 ) on Tuesday March 07, 2006 @07:08PM (#14870732) Homepage Journal
    code looks almost identitical

    There is a lot of devil in the details of that almost, however. C# has developer API comments yet VB.NET does not. VB.NET has more support for shadowing than C#. C# has useful convenience functions like using that VB.NET does not. VB.NET has convenience functions for late binding (considered harmful) and case-insensitive string comparisons that C# does not. C# has more object oriented features such as operator overloading that VB.NET does not. The list goes on and on.

  • Re:Bad idea (Score:5, Informative)

    by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Tuesday March 07, 2006 @07:12PM (#14870766) Homepage Journal
    OK, that's just mean.

    I totally disagree. Difficult? Complicated? Sure, but not mean. People who have learned assembler are the ones who understand why

    for(int y=0; y<ysize; y++) {
    for(int x=0; x<xsize; x++) {
    do_something_to_pixel(x,y);
    }
    }
    will usually run faster than
    for(int x=0; x<ysize; x++) {
    for(int y=0; y<xsize; y++) {
    do_something_to_pixel(x,y);
    }
    }
    even though both are conceptually identical. There are many things that seem perfectly reasonable in high-level languages that turn out to be a really bad idea once you learn what's going on in the hardware. I'm sure it's possible to learn that stuff without hitting the metal a few times, but I've never, not one single time, ever met someone who's done so.
  • Re:still C (Score:3, Informative)

    by tehshen ( 794722 ) <tehshen@gmail.com> on Tuesday March 07, 2006 @07:16PM (#14870797)
    That'll be Slashcode stripping out the well-known <stdio.h> tag.

    If you don't know this yet: Use &lt; for < and &gt; for >
  • Re:Why not both? (Score:5, Informative)

    by Samus ( 1382 ) on Tuesday March 07, 2006 @07:34PM (#14870929) Journal
    Time to update to .net 2.0. A lot of the discrepencies that you mention are now gone.
  • Re:Why not both? (Score:3, Informative)

    by CSMastermind ( 847625 ) <freight_train10@hotmail.com> on Tuesday March 07, 2006 @07:39PM (#14870969)
    Well I suppose that all depends on how you define CS. Wikipedia (http://en.wikipedia.org/wiki/Computer_science [wikipedia.org]) defines it as, " the study of the theoretical foundations of information and computation and their implementation and application in computer systems". With a definition that broard there a many applications that require a better education than what you speak of. There's still a lot of programming that gets done at the assembly level. There's still a lot of programming that isn't involved in staight code. There's robotics and there's AI and there are other emerging feilds that need a degree program to produce people who are educated enough to do the work. Not to mention all the math and physics that are involved in CS.
  • by nicolas.kassis ( 875270 ) on Tuesday March 07, 2006 @07:42PM (#14870997)
    I second that, Python is easy on the beginers but, I still think that to make a good programmer you need to teach him/her 2 languages. C first and then Python. The reasoning behind this is that C teaches a lot of basic (easy and complex ) things such a variable and memory, functions, types, stucture, control flow.... It shows new programmers a lot of concepts that are part of the majority of languages (Even just a Subset of features). After new programmers have done it the hard way, Python is great to start talking about OOP, Data structures, Algorithm... Since it's a pretty quick to code most things in python and that it removes the major pain of memory management, it allows for quick and easy learning of some more complex topic like those I have just mentioned. Finally I say that learning C and Python will allow most to learn any other language in a short period of time. It makes well rounded people. Java is also quite nice for beginers. But C and Python are just more usefull together. They fit in more places. Nic
  • Re:Why not both? (Score:3, Informative)

    by zootm ( 850416 ) on Tuesday March 07, 2006 @07:49PM (#14871068)

    That's not entirely true - VB has its own set of libraries, and the .NET systems were designed to be (as much as possible) language-agnostic, rather than "designed for C#". This is a pretty major benefit of the CLI - it was designed with many OO langauges "in mind", and works pretty much as well with all of the languages it ships with (and, happily, they mostly interoperate with one another).

    I hate VB, but .NET does at least make it a fairly serious tool. Some people find Basic easier, or it's what they're used to, so I don't see a particular reason to stop them using it (I gave up trying to "educate" people years ago). VB.NET is, despite how it may look, a pretty clever language in a lot of ways.

    I hate coding in it and reading code examples for it though. Makes my blood boil. But it's quite a difficult tool to dismiss.

  • by brosenth ( 914047 ) on Tuesday March 07, 2006 @07:55PM (#14871107)
    Visual Basic was my first programming language, and it's a powerful language and Microsoft is a powerful platform.

    The problem is that to do anything in the Microsoft family requires continual financial investment. Visual Studio itself (standard edition) is $299. As you learn to program, you'll probably want to program what's called "Client / Server" applications. You'll probably want to buy SQL Server ($6000 for the Standard Edition), Windows Server ($1000-ish). As you develop, you'll always find that you need other products that you don't have, and you'll always be trying to decide is it worth buying the product to learn how to do things.

    Alternatively, you can learn how to program in the open-source environment. You'll find wonderful, free development tools. You'll find a community of people eager to help you learn (rather than paid support options). And, once you learn how to program this way, you'll be able to deploy real applications, without paying high licensing fees.

    I remember, when I started my first company, we were a Microsoft shop, and I wanted to give away some of the technology I had written to non-profits, but I couldn't because they could not afford the licensing fees.

    If you want to program a web-based application, I would install linux and apache-ssl and learn PHP. If you want to program an application to run on a client-computer, I would learn python. Both are very elegant languages that are easy to learn and have huge developer communities that are very helpful. These environments are very good investments of your time, easy to learn, and will prepare you to not have to change courses later on.
  • Java or C# (Score:2, Informative)

    by The Waxed Yak ( 548771 ) on Tuesday March 07, 2006 @08:19PM (#14871283)
    VB is an excellent choice for mediocre programmers who already have a basic grounding in CS. Unfortunately, VB tends to mask the basic CS skills a developer needs to acquire to grow beyond it. I've worked with several people who had great potential, but were forever stuck in a VB frame of mind. Java and C# are nearly as easy to learn as VB, granted they are lacking a bit of the syntactic sugar. I would recommend Java over C#, simply because the class library adheres much more closely to the standard "Gang of Four" design patterns, which equates to exposure to good design principles for a new developer. Don't get me wrong, .Net has a good class library as well, but I find that it isn't as consistent in its interface definitions as Java is.

    Now, the argument that will probably pop up to correct me is that VB.Net uses the .Net class library, and as such is no different from C#. Having spent the last few months cleaning up after VB.Net developers, I would argue that it would be, if they used it as such. Frankly, when a new or unskilled programmer picks up VB.Net, they immediately use Trim$(myString) versus myString.trim(). Granted, it does the same job in the end, but it is training them to avoid OO methodologies.

    My next big rant would be that VB.Net will spoil a new developer on expecting everything to read immediately like plain English. Don't get me wrong, now, that's one of the nice things about VB. If Then... Gotta love that, except... If they get spoiled by this, then they are forever stagnated in VB. I have one developer I work with, every once in a while, who simply refuses to transition to any other platform just because he is locked into VB's syntax. A syntax which is unlike 90% or better of any other languages out there.

    Java, C#, even PHP and Perl, share more in common in syntactic terms than VB does. Start a new developer out on a platform that will foster a better understanding of other platforms, instead of locking them in like VB tends to.

    <Disclaimer>I made my living for years doing VB, but not by choice. I'm a dyed-in-the-wool C programmer, who prefers Java these days.</Disclaimer>
  • * VB is badly OO and confuses the language and the library too much.

    Not anymore

            * VB is badly OO and OO is a bad paradigm to first learn to program in (and those two wrongs don't make a right).

    It is nolonger bad OO and OO is a good paradigm to learn to program with.

            * VB ties you down to using Windows, and Windows is a bad environment to learn to program in.
    Acutally, it ties you to .net, and other .net iumplementation i.e. Mono

            * VB does memory management the wrong way from a learning perspective. Rather than specifying allocators and destructors when neccessary you simply let objects fall out of scope.

    Which is how things are done now. However, you can implement garbage collection for those time when it is critical to do it now. However that is an indicator of either poor design, or that you should be using code that is clser to the machine.

            * VB does not have first-class functions and cannot fake them: function manipulation and functional paradigms (whether direct or through hacks to fake it like function pointers or true reflection) is crucial to learning to program well and should be started as early as possible.

    You can do this in VB

            * VB teaches bad, verbose naming and programming habits.

    That has nothing to do with language, however accurate verbose naming is far better then short obscure names.
    Verbose programming habits in application development is a good thing. Not the best, but certianly better then implementing somme little know technique that is hard to deciphire jsut ecasue it saves a 1/100 of a second.

    Funtion oriented programming languages are a poor place to start. The habitrs generated in those create very bad habits in OO programming.

    All but two of your recommendations are total useless for real worled practicality.

  • by Eli Gottlieb ( 917758 ) <[moc.liamg] [ta] [beilttogile]> on Tuesday March 07, 2006 @08:51PM (#14871504) Homepage Journal
    In the open-source community! The Free Pascal Compiler [freepascal.org] is a working command line compiler for the Delphi language, Object Pascal, and a graphical IDE called Lazarus [freepascal.org] is available to step in for Delphi itself.

    Beholdeth the Open Source Power, that it doth keep languages from the grave!
  • by ZxCv ( 6138 ) on Tuesday March 07, 2006 @08:52PM (#14871508) Homepage
    With .NET 2.0, this is no longer entirely accurate. Even with 1.1, you could have used Array.Copy instead of the loop like someone said. Beyond that, with 2.0, you have access to Array.Resize:


    VB.Net:
    Dim x(10) As Integer
    'populate x
    Redim x(20) As Integer


    C#:
    int[] x = new int[10];
    // populate x
    Array.Resize(ref x, 20);



    Personally, I'd have to say the C# variant is the simpler one now.
  • Keep in mind that VBA is used with MS-Office applications, and VBScript is used on IE designed web pages which are related to Visual BASIC. Learning one, can help you learn the others.

    Visual BASIC.NET was a rewrite of Classic Visual BASIC, which added in C++ type error trapping, objects, and other things that many have criticised Classic Visual BASIC for not having. Many VB developers want Microsoft to continue to support Visual BASIC 6.0 or Classic Visual BASIC, but Microsoft wants to move on.

    BASIC stands for Beginners All Symbolic Instruction Code, the first word is for beginners. It was not designed to be anything but a learning tool, like Pascal, Pilot, and many other languages were designed to be. Microsoft used it for early Microcomputers, and then made a GW-BASIC version of it for MS-DOS and then later QBASIC or Quick BASIC for MS-DOS 5.0 and above. Many considered GW-BASIC and QBASIC to be free versions of BASIC and developed for them. Microsoft released Visual BASIC 1.0 and many BASIC developers adapted to it. I recall learning MS-Access 1.0 and using a form of Visual BASIC for applications for it, which they called Access BASIC or something.

    Borland picked up the Pascal craze, in colleges they taught Pascal for data structures courses. There was UCSD Pascal, but Borland came out with Turbo Pascal and it worked faster than most Pascal compilers. Object Pascal became Delphi by Borland, and it is still popular and a competitor to Visual BASIC. Free Pascal tries to use Object Pascal to be more like Delphi and the Lazarus project uses an IDE with Free Pascal to work like Delphi or Visual BASIC.

    I think there is an XBASIC out there that works like Classic Visual BASIC. Someone made a GNOME BASIC. The Novell Mono project has a Visual BASIC.NET language which is used on Windows, Linux, Mac OSX, *BSD Unix, etc.

    The whole argument against Visual BASIC is now moot. Classic Visual BASIC lacked proper OOP, but Visual BASIC.NET fixes that, but at the cost of learning new programming methods and syntax for Classic Visual BASIC developers. While designed for beginners, Visual BASIC has extended itself. Visual BASIC.NET uses a compiler very much designed like C# or C++ to compile into IL (Interprited Language) code (which is like assembly language) to run on the .NET Framework, and it is turned into native code in the final compiltion. Visual BASIC.NET no longer has the bottleneck that Classic Visual BASIC had, and as a result it runs faster.

    You will be shocked to find that most businesses use Visual BASIC.NET for the same reasons that they used to use COBOL, it is easy to learn, uses English words, and almost anyone can learn it.

    Still don't discount C#, C++, Java, Python, Perl, and many others, they can interface with Visual BASIC via the .NET framework. Visual BASIC can be used as a stepping stone to a different language, or it can be used for main development.
  • by bdowd ( 159289 ) on Tuesday March 07, 2006 @09:16PM (#14871678) Homepage
    No, when Visual Basic 1.0 was first released at Comdex it was Visual. I believe you are confusing it with some of the other MS Basics which preceeded it. The whole idea was bought from Alan Cooper (sp?) who didn't work for MS at the time.
  • NO! (Score:2, Informative)

    by nektra ( 886676 ) on Tuesday March 07, 2006 @09:32PM (#14871775) Homepage
    No, VB is not a good beginner's language for programmers thinking on current and future understanding of languages.
    And worst in 2006...

    Some reasons:

    - Lack of natively data structures and powerful objects.
    - To build new data structures you need to focus in the language and in the problem, not like C when you can focus on the raw problem/algorithm.
    - No real OO, just COM Native.
    - No multithreading.
    - Bureaucratic syntax to do very simple things (i.e: adding a new element to a sized dimmed array, writing to files, etc)
    - Weird syntax (like putting and underline to specify object's events)

    But, it has some interesting properties:
    - Rapid testing of COM/ActiveX Objects.
    - Rapid development of COM/ActiveX Objects (for example: Office Addins)

    But for learning... think in another language.
  • Re:TwIPS (Score:3, Informative)

    by MythoBeast ( 54294 ) on Tuesday March 07, 2006 @10:00PM (#14871904) Homepage Journal
    Is TwIPS just something you made up?

    Well, yes and no. I originally ran into TwIPS when taking programming classes at St. Louis Community College. Like, you, I've been completely unable to find any reference to it since then, so I wrote my own. I'd be happy to hand my code base over to anyone who feels like working with it, or drop it onto something like SourceForge.

    The twelve instructions are Go, End, Move (copy, really), Jump, Conditional Jump, Subroutine Jump, Return, Add, Subtract, Multiply, Divide, and Print. Ok, that's really eleven, but I couldn't remember what the twelfth one was when I recreated it. It uses a 1000 character text array that acts as your entire memory space. You have to allocate buffers, create your initial variables and strings, and store all your code in that space. It will start execution at location 000, the Go was just something that I remember them including, so I did, too.

    I don't think I have any of the exercises I had my students do written down, though, so you'd have to make up your own. It's not too hard.
  • by srcosmo ( 73503 ) <ultramegatronNO@SPAMgmail.com> on Tuesday March 07, 2006 @10:50PM (#14872131) Journal
    JavaScript is great, as long as you make sure they're testing it on a non-IE browser. Not only are Internet Explorer's error descriptions unhelpful ("object expected"!), but in my experience, even the line numbers are often incorrect.

    Firefox has a great JS console with a log of recent errors, rather than a nasty modal window that pops up every time something goes wrong. And if your students are ever doing a DHTML project, the DOM inspector is a godsend.

  • Re:Why not both? (Score:3, Informative)

    by jbplou ( 732414 ) on Tuesday March 07, 2006 @11:25PM (#14872245)
    Have you programmed in .NET because I find it hard to believe.

    C# has useful convenience functions like using that VB.NET does not

    VB.NET has imports which is mostly the same as C# using. It lets you short cut your code, but does not allow aliasing like C# using.

    VB.NET has convenience functions for late binding (considered harmful) and case-insensitive string comparisons that C# does not.

    VB.NET string comparison is case sensitive by default. Ex "abc" = "ABC" would evaluate as false. In C# or VB.NET you would perform case insensitive string comparisons the same way, either using string.tolower(or .toupper) on both strings or preferably using string.compare(string1, string2, true).

    C# has more object oriented features such as operator overloading that VB.NET does not

    VB.NET in .NET 2.0 does have operator overloading.

    C# has developer API comments yet VB.NET does not

    There are about a dozen free addin for visual studio to perform this task.
  • by batkiwi ( 137781 ) on Tuesday March 07, 2006 @11:27PM (#14872263)
    He's asking about VB.NET, not oldschool VB. None of your comments apart from "VB is good if you want code that you can read but not understand" apply.

    -VB.NET code will run on freebsd and linux
    -VB.NET has no known "stability" issues, as it generates mostly the same bytecode C# does
    -VB.NET is strongly typed as long as you set "Option Explicit On," which everyone does.

    Now, I dislike VB.NET, but due to its syntax. Sub/End Sub instead of {} just bugs the shit out of me.
  • Oh no. Oh Hell no. (Score:2, Informative)

    by darthlurker ( 663459 ) on Wednesday March 08, 2006 @12:37AM (#14872546)

    I don't have a link on hand. But I recall reading Microsoft reps touting VB.NET maintining the VB6 ability to "code and debug until the code works". To me that should be sufficient reason to not use VB.NET. If you want another reason, please excuse my following rant.

    The language is not isomorphic. For example:

    '2 ways to declare an array of types.
    Dim s1 As String() = {"1", "2", "3"}
    Dim s2() As String = {"1", "2", "3"}

    '2 Different ways to instanciate a class
    Dim o1 As Object = New Object
    Dim o2 As New Object

    'Support for
    Dim n As Integer = 0
    n += 1
    'But not bits (booleans)
    Dim f As Boolean = False
    f And= True

    '3 (unsafe) ways to convert to a char (and using reserved words for variable names?)
    Dim [char] As Char
    [char] = "C"c
    [char] = CChar("C")
    [char] = CType("C", Char)

    Granted in the last case you see use of the "TCHAR" and other such macros in C/C++ code. But these are macros. And not part of the language.

    MS also ported in many of the old global VB6 methods such as Trim(). Even though this is a redundant method of the String class. Format() is another example. But in that case the behavior differs from the the method of the same name in the String class.

    From experience I've found it easy to transistion from one language to another. Except when that language had "quirks" like those in VB.NET.

    VB.NET was a very successful way to move VB6 coders to VB.NET. But is it a Good Beginner's Language?

    No. Hell no.

  • Re:Why not both? (Score:3, Informative)

    by eajhnsn1 ( 618790 ) on Wednesday March 08, 2006 @12:43AM (#14872569)
    I believe the "using" the poster was talking about was the C# keyword that provides automatic .Dispose() execution once the block is out of scope. It's a shortcut for wrapping the code in a try-finally and calling Dispose() in the finally.

    For example if SomeClass implemented IDisposable:

    using (SomeClass x = new SomeClass())
    { // work
    }

    would be equivalent to

    SomeClass x = new SomeClass();
    try
    { // work
    }
    finally
    {
          x.Dispose();
    }
  • Re:Why not both? (Score:2, Informative)

    by Fjornir ( 516960 ) on Wednesday March 08, 2006 @01:29AM (#14872747)
    VB.NET has imports which is mostly the same as C# using. It lets you short cut your code, but does not allow aliasing like C# using.

    I'm fairly certain that anomalous cohort meant using(){} blocks and not the using statement. Ignoring the collision in the keywords using(){} is a wonderful piece of syntactic sugar. Inside the ()s of a using block you can declare and instantiate a set of objects -- and when the closing brace of the using() block the objects are automatically Dispose()ed.

    It seems silly at first -- until you stop to think of it. A VB app is required to Dispose() of its own temporary objects. On trivial objects this doesn't mean a whole heck of a lot -- they can sit hogging whatever trivial resources they want until the garbage collector gets around to noticing they've gone out of scope and does a GC pass on them. On more substantial objects this can mean quite a lot -- I want my DB connections freed up ASAP, for instance...

    "Well, the VB coders can just Dispose() of their objects, no problem...." -- Sure they can -- but if they Dispose() of the object and then accidentally use it again they now have a runtime error to debug. If a C# coder puts the closing brace of a using(){} block in the wrong spot and tries to use one of the objects he instantiated in the ()s of the using(){} block it forces the error into compile-time where it's a bazillion times easier to troubleshoot.

  • Re:Why not both? (Score:5, Informative)

    by chthon ( 580889 ) on Wednesday March 08, 2006 @03:39AM (#14873138) Journal

    Scheme and this book [mit.edu].

  • Re:still C (Score:1, Informative)

    by Anonymous Coward on Wednesday March 08, 2006 @03:50AM (#14873161)
    $ cat test.c
    int main()
    {
    printf("Hello world\n");
    }
    $ gcc -o test test.c
    $ test
    $
    For those who missed it, it should be ./test, test invokes /bin/test
  • Re:Bad idea (Score:3, Informative)

    by mewphobia ( 630153 ) on Wednesday March 08, 2006 @05:08AM (#14873361) Homepage
    VB.NET is essentially a full OO implementation, unless you're willing to call Python or Java "toys" because they don't support multiple inheritance

    class DerivedClassName(Base1, Base2, Base3):

    Granted, it's not the most useful implementation in the world, but python supports multiple inheritance.

  • This is crap. (Score:5, Informative)

    by sultanoslack ( 320583 ) on Wednesday March 08, 2006 @07:47AM (#14873864)

    Sorry, but this is a very wrong view of what computer science or programming really are. There are three things being mixed up here which are largely separate bodies of knowledge and any decent computer science program separates them out as such.

    • Algorithms - This is the core of Computer Science; learning to think like a programmer and to break problems down into logical chunks is tantamount to becoming a computer scientist. With this at the core, a language should then be chosen that most facilitates this. When I started college 10 years ago we used Pascal in our lab for our algorithms courses (which notably were just about implementing the theory we covered in the course), and that at the time was a very sane choice. Java's a pretty sane choice these days. Lots of things are really, but something like C forces people trying to learn how to think in algorithms to be side tracked by all of the tedious low level junk. (For reference, I'm a low-level C systems programmer at a large software company, so this isn't some "C sucks" wankery.)

    • Computer Organization - This is usually cross listed in electrical or computer engineering, and for good reason. This is where you figure out how hardware works. C and assembler (RISC works fine here) are appropriate in such a course. As this course naturally follows introductory algorithms courses, you can here put the theoretical constructs learned there in context.

    • Operating Systems - Memory management doesn't belong in either of the above and certainly saying that you learn "memory management" with C is pretty silly. You learn how to malloc and free stuff. Whoopee. "Memory management", in any sort of interesting way, is better treated in an Operating Systems course where you can track what exactly is happening down from the programming language, into the OS and finally at the hardware side. It can be put in context of what actually happens when you call malloc and what that means. Fundamentally, you don't understand anything more about memory management from a basic C course than if somebody tells you in a Java course "When you use 'new' some memory will be allocated, and when you're done with that object there's a thing called a garbage collector that will eventually come and give that memory back." Memory management is a non-trivial topic and one that certainly goes deeper than simple allocation.

    So, is VB suitable for any of this? Not really. VB is kind of orthogonal. Like you said, it's fine for someone who needs to solve certain sets of tasks, but doesn't want or need to bother with really understanding deeper concepts.

  • by Anonymous Coward on Wednesday March 08, 2006 @09:10AM (#14874180)
    Pascal is the best teaching language for newbies.
  • Re:Why not both? (Score:2, Informative)

    by bigtangringo ( 800328 ) on Wednesday March 08, 2006 @09:21AM (#14874214) Homepage
    You know, I like Python, but I swear to god their lack of coding standards drives me absolutely nuts.

    Go look through the modules:
    Modules, methods, properties named with underscores, camel case with upper or lower first letter, etc.

    Batteries included, but they're all different sizes.

    That said, I really dig Python in general.
  • Re:This is crap. (Score:3, Informative)

    by Durandal64 ( 658649 ) on Thursday March 09, 2006 @01:09AM (#14880930)
    I don't think you're taking allocation and freeing seriously enough. Students, especially ones who learned the basics in Java or another "do it all for me" language, generally have a difficult time with pointers. My school, for example, just switched the two basic programming courses from C++ over to Java. The algorithms course is taught in C++ and gets into memory management and pointer programming fairly deeply. I worked with a guy who took the programming courses in Java, and he had absolutely no idea what was going on in C++ with respect to pointers. You're a low-level C programmer, so pointers are probably like fruit to you. But there are plenty of students out there who can't make sense of them, and it's not entirely their own fault.

    Getting the basics in C or C++ gives students the tools they need to pick up pretty much any other procedural language. Someone fluent in C++ can pick up Java in a day or two. Someone fluent in Java has to learn entirely new concepts (like direct access to memory) in order to pick up C++ or C.

    I don't necessarily disagree with what you're saying, but from my personal experience, if I'd learned Java first instead of C++, I would've had a bitch of a time learning how to program in Objective-C / Cocoa, which is how I make my bread and butter currently. But really, I think that as far as problem-solving methodology goes, students should go through what the field of computer science has gone through. Start out with structured programming and then realize that there are certain problems that it cannot solve easily. Then introduce them to object-oriented programming so they can have a basis through which to appreciate it. I count being able to write a purely structured program as a good thing.

Always draw your curves, then plot your reading.

Working...