Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Education Programming Technology

Best Language for Beginner Programmers? 448

jahardman asks: "I work at a High School that has recently seen a decline in the number of students that want to take our entry level-programming course in Visual Basic. We have been toying with the idea of having the introduction course be in PHP or Ruby on Rails; but are not convinced that they lead well into higher level languages. Does anyone out there have suggestions as to what would be a better language to start students with? Ideally one that might be more 'enticing' as well?"
This discussion has been archived. No new comments can be posted.

Best Language for Beginner Programmers?

Comments Filter:
  • RealBasic (Score:3, Insightful)

    by Blakey Rat ( 99501 ) on Thursday August 11, 2005 @07:42PM (#13299373)
    You could try them out on RealBasic: http://www.realbasic.com/ [realbasic.com]

    It's a lot like Visual Basic, except:
    1) Portable to MacOS and Linux
    2) Easier to just jump in and write apps with
    3) Produces apps with no DLL dependencies.

    Give it a try, you might find it meets your needs.
  • Java? (Score:4, Insightful)

    by m0rph3us0 ( 549631 ) on Thursday August 11, 2005 @07:44PM (#13299382)
    Java might be a good idea. Lots of tools available for free, and isn't domain specific like PHP.
  • consider Python (Score:5, Insightful)

    by Tumbleweed ( 3706 ) * on Thursday August 11, 2005 @07:45PM (#13299394)
    If I'm remembering correctly, Python came out of a language designed for teaching. The very syntax encourages some good programming principles (indentation, etc.), and it's object-oriented. It's a very common language to find on shared web hosting plans. Also, Ruby on Rails isn't a language - it's a framework. The language is Ruby. Ruby would also probably be a good language for students to learn, though it seems less popular right now than Python.

    PHP as a _language_ is probably not a great idea, but used in conjunction with web development, it would be great, but don't forget MySQL and/or PostgreSQL. And Perl, though that should come later; students need to learn programming with something with decent syntax before being exposed to something like Perl.

    IMO, anyway.
  • by DaoudaW ( 533025 ) on Thursday August 11, 2005 @07:46PM (#13299401)
    I've been recommending (and teaching) c++ for several years now. Pascal was great, even Java has its good points. The main thing is whatever language is being used to introduce programming use it as an example language for the programming concepts which are being taught.
  • My answer (Score:5, Insightful)

    by Omnifarious ( 11933 ) <eric-slash@nOsPAM.omnifarious.org> on Thursday August 11, 2005 @07:47PM (#13299409) Homepage Journal

    I don't know about Ruby on Rails, but I strongly agree with you about PHP and VB. I think they both lead poorly to working in other languages.

    I would recommend Python, because I'm more familiar with it than Ruby. It has a clear, elegant syntax, and many concepts in it exist in other languages as well.

    But, Ruby may be perfectly adequate as well. I know that most concepts that exist in Python that aren't particularly language specific have counterparts in Ruby.

    I used to recommend assembly, then scheme, just so all the people who entered thinking they were programmer hotshots because they knew BASIC, VB or C or something would find themselves in deep water and having to learn something new.

    But I suspect that's a bit overly hostile. Depends on the environment of course. Still might be a good idea for people going to a hard-to-get-into technical school to knock them down a peg or two and convince them that there's stuff they don't know.

  • Python (Score:5, Insightful)

    by MBCook ( 132727 ) <foobarsoft@foobarsoft.com> on Thursday August 11, 2005 @07:53PM (#13299445) Homepage
    Python. Python has everything you need and then some. It runs on every platform (Linux and OS X boxes already have it installed), and it's free.

    Python (through the use of forced whitespace) forces them to learn to write more readable code (I remember taking C++ in high-school, the stuff people wrote would make your eyes bleed). The language has everything your students might need for intro programming (for loops, functions, etc). If they want to continue on will Python later (or you want to offer advanced classes later) it has bindings for all sorts of stuff (XML, OpenGL, QT, GTK, and many many other things). It also has all sorts of handy stuff like an interactive interpreter, a "for each" loop, and more. It's object oriented too.

    Look into Python. It's easy to use and would make a great stepping stone if they want to later use a language like C/C++/Java. Or (as I said) Python is great in and of its self and they can stick with it.

  • by losman ( 840619 ) * on Thursday August 11, 2005 @07:53PM (#13299449)
    In school kids have objectives that are more short term. Graduating, having fun and being creative are common examples of that. As educators you have more long term objectives for the kids. Preparing them for college or the professional world being prime examples of that. The answer to your question is somewhere in the middle.

    If I wanted to interest kids in programming and teach them something useful I would try something like a course in Unreal Tournament editing or some other game that has a well defined scripting language. Yes it is a game but the scripting language is very C like in nature. And let's be honest you should really be focusing on teaching them how to analyze, break down and solve problems progamatically regardless of the language. Teach them that and then let them decide if it is something they want to pursue.

    Another great aspect of teaching a course this way is that it shows them both the difficulty and the rewards of programming. It is not easy to create good levels in these games. They have to learn to handle various types of media as well as programming the main logic. As a great bonus they end up with something they all can play with in the end.

    Any how, this kind of idea is not for a conservative environment and if you are in that situation then teach them Java and emphasize object oriented development. If your environment is a bit more progressive then I would look at the gaming route.
  • by thephotoman ( 791574 ) on Thursday August 11, 2005 @07:54PM (#13299458) Journal
    Go with Python. It's quick, easy, and clean. It encourages decent syntax, and is portable to anything. Furthermore, as it's interpreted, you get the instant gratification of being able to run the program once you've saved it and set the permissions--no waiting on a compiler. Also, studens can take their work home with them, as it's portable and free both as in freedom and as in beer.

    Also, the GUI bindings aren't that hard to use and most are equally portable.
  • Java (Score:5, Insightful)

    by OAB_X ( 818333 ) on Thursday August 11, 2005 @08:05PM (#13299529)
    Java is easy to learn, gets programs that do real stuff going rather quickly, and is runable on any platorm, and is enterprise level.
  • Why not C? (Score:5, Insightful)

    by dasunt ( 249686 ) on Thursday August 11, 2005 @08:13PM (#13299580)

    Why not teach them C?

    (Oooh, I can't wait to watch the modding for this comment.)

    C has a standard (a few, actually, C89 and C99 are probably the most important). Its not a difficult language to learn, its supported on almost every platform out there, and for certain tasks, its the only choice. Plus, there are many good support tools for C (gdb, valgrind, gprof, etc). Finally, many, many libraries are written in C -- C often ends up being the 'glue' code to tie another language to a specific library. And don't forget the many, many projects that already exist in C -- if you want to extend any of those projects, you need to understand the language.

    I always thought that assembly is not a bad teaching language either. It helps to understand how a processor works.

    I would also recommend lisp, but that has already been covered in this thread.

  • by MobyDisk ( 75490 ) on Thursday August 11, 2005 @08:45PM (#13299765) Homepage
    Here's my qualifications for choosing Java, then Assembly:

    Java:
    - Is not too verbose (Hello World is not daunting)
    - Any algorithm can be reasonably implemented
    - Any structure can be reasonably represented
    - No low-level complications like pointers
    - Supports modern programming techniques like functional and O-O
    - The student can do real-world things in it
    - The student can experiment at home for free

    Don't forget assembly!!
    - Too many new programmers need to do something low-level, or interoperate with another language, and they have no concept how memory is arranged, what source code compiles down into, or even what a compiler does! They don't comprehend that a string isn't an intrinsic thing the CPU recognizes, and that there are hundreds of ways to store and manipulate them. So when they have to learn about memory-thrashing, multithreading, garbage-collection, optimization, etc. they are lost.

    This must be taught this very early on, not as an advanced course, so that when they learn other lagnauges and algorithms they can see where it comes from.
  • by frenchs ( 42465 ) on Thursday August 11, 2005 @08:50PM (#13299787) Homepage

    Let me start this post by putting on my flame-proof suit. =)

    In order of preference:
    1. C++ - but don't move into the advanced features right off the bat. I like string handling better than C though, so it gets the nod for the top slot. But the user would have to learn the compile process. Templates, STL, and OOP can all be added once you have the basics down.
    2. C - pretty much on par with C++ in the features you would want to introduce to a beginner.
    Ones I'm unsure on:
    • Pascal: I can't comment on this one, but it's supposedly well-suited for teaching.
    Ones I wouldn't touch for intro programming because of syntax.
    • Python
    • Ruby
    • Lisp

    These are all fine languages, but they all have specialized syntaxes, and the bridge between that, and their *next* language would be where you do them a disservice by using these ones.

    Other poor choices:
    • Perl
    • PHP

    Perl, which has a reasonably decent syntax, but because of the TIMTOWTDI philosophy, it's actually, IMHO, an ill-suited introductory programming language.

    PHP, while similar syntax to C/C++, has the benefit of not having to learn how to compile apps. It's ultimate downfall is it's scoping rules and lack of namespaces. This is stuff an intro programmer should learn about.

  • by fireweaver ( 182346 ) on Thursday August 11, 2005 @08:51PM (#13299794)
    Personally, I am a fan of Wirth-style languages, so I would recommend Modula-2 (successor to Pascal with a cleaner syntax), or Oberon (successor to Modula that adds objects and garbage collection). Although I'd stay away from the native Oberon programming environment since it is quite unlike the environment most of us are familiar with (Windows and its look-alikes). Both of these languages, like Pascal were designed for instruction, but are powerful enough to be used in production environments.
  • Re:Why not C? (Score:2, Insightful)

    by dasunt ( 249686 ) on Thursday August 11, 2005 @09:01PM (#13299854)
    Now tell me, what is ONE thing you can do in C that you can't do in another language? And by another language I can mean anything from machine code, various architecture assemblers, C++, etc..

    Gotta weasle a bit: By saying "only choice", I meant "only reasonable choice".

    Short of assembly, C (or its cousin C++) is frequently the only reasonable choice for embedded programming (and lets be honest, for big projects, assembly is quite often not a reasonable choice). When resources are low, C shines. Interestingly, John Carmack had a blog just the other day about how you can use Java for cellphone programming, and detailed his gripes about the performance of Java on a cellphone.

    In addition, if you want to extend code written in C, you are going to have to know the language. Want to use a new C lib in python? Time to hack up a module in C. While this is true for any language, the sheer amount of libs and programs written in C is a strong incentive to learn C. (However, for the most common libs, there are often language-specific wrappers -- for example, pygames is a python wrapper around the C SDL libraries).

    Now, I'm sure someone is going to come up with an example about how to use a black candle, three monkeys, and the giant keyboard of Thor to use another language for a job that C has been traditionally good for. I applaud such a hack. But lets be honest -- the same thing that makes C a pain to use (manual memory management) also makes C a rather useful tool for some jobs.

  • by Dukhat ( 198764 ) on Thursday August 11, 2005 @09:16PM (#13299936)
    I don't think anybody who is new to programming will think a programming language is cool based on the capabilities of the language or the libraries it has. The coolness factor is based on seeing some application built in it, and they want to be able to do the same thing. I doubt that there is any consensus among your students as to what a cool language is. The students may have some aversion to VB from things they have read, but all languages have critics as well as hype.

    I think you will be able to attract students to your course by focusing on what you can do in the course and not on what language you get to use. A course on "Building a Blog", "Programming a Robot", or "Building an Online Store" is much more enticing than PHP or Ruby on Rails. When you watch a home remodeling show, they don't advertise it as the show with the coolest miter saws and wrenches. The show isn't about the tools, it is about the end product, a new deck, or new cabinets in your kitchen.

    Since you are teaching new programmers, I will suggest languages and frameworks based on how easy they are to start using as opposed to how good they are in the long run.

    PHP has excellent documentation. Although its function names can be inconsistent or duplicated (e.g. sizeof, strlen, count), it is fairly easy to follow the code. This would probably be the easiest well development platform to get started on without evaluating different components, since you really don't need to bother with libraries to do MVC for a beginners course. You definitely will want to set up PHP with "xdebug" so that PHP will provide you with a stack trace for your errors. Otherwise, you will only see the line number where the error occured, which is not very useful if the line number is inside a function that gets called in a hundred different places.

    Ruby on Rails is a very large frameworks, and you are just throwing names around to suggest this for an intro course. Ruby, the language, and a basic html templating system might be easy to teach, but Rails involves the MVC pattern, object-relational mapping for database access, and an architecture for unit/functional testing. This is NOT good for beginners. The Rails tutorials will also give you a false impression of how easy it is by having you build a bunch of database driven web pages with very little code. After you finish the tutorial, you will still have a lot to learn.

    Although I think Ruby is a more powerful language for an experienced developer than PHP is, it has a lot of syntax rules to learn. For example, curly braces {} could contain a block of code or an associative array, and "joe!" means run the joe! function, and "!joe!" is a boolean NOT operator acting on the return value of joe!

    My personal favorite programming language is Python. It has a cleaner syntax than PHP or Ruby, although an amazing amount of new Python programmers are burnt by mismatched indentation between tabs and spaces. Python will treat a tab as the same indentation level as 8 spaces, but your text editor may be using a different value. Even though python tells you the line where the syntax error is, the error may be invisible in your editor. If you are interested in Python for web development, Zope involves learning too much infrastructure for beginners. You would be better off with Spyce.

    Instead of making your students build things from scratch, they may feel likethey are accomplishing more by customizing an opensource program that alreadyexists. You can find a bazillion PHP web portal projects at http://freshmeat.net./ [freshmeat.net.]

  • Re:consider Python (Score:3, Insightful)

    by Incongruity ( 70416 ) on Thursday August 11, 2005 @09:19PM (#13299948)
    Python's so quirky with the whitespace (I don't mind the whitespace personally, but I think it's weird to teach it as syntax in a first language).

    Quirky? How so? The using of whitespace/indentation for meaningful things really only encourages good programming and readable code. As long as you don't mix tabs and spaces (i.e. use a decent text editor that allows you to replace tabs with a group of spaces) the mandatory indenting is a fantastic thing.

    Much in the same way that LISP's usage of parenthesis made it so much easier to write code that worked on the first attempt, Python's indentation rules are extremely helpful help your write good code quickly and keeps it readable (also a plus if you're a teacher who has to read what the students code). Moreover, by encouraging high readability standards, starting in python will be make you a cleaner coder in other languages because your standards will be raised... again, all that's just my opinion...

  • Re:Why not C? (Score:5, Insightful)

    by Better Than Bacon ( 828025 ) on Thursday August 11, 2005 @09:20PM (#13299952)
    When I first started with Java/VB, I found programming to be really hard. I decided to learn assembly/C++ and, just like dasunt said, I think they taught me how computers really work.

    Once I knew that everything is a just a number (pointers, instructions, everything) and that memory is just one big linear array, nothing was a mystery anymore -- I could figure out what the compilers and other languages were really doing. This put me way ahead of average programmers my age until 4th year university when they forced everyone else to learn that stuff.

    To be a good programmer I think you have to understand how computer really work, and C/assembly is the best way to pull back the curtain and be confident that you can get anything to work.

    On a related note, when people are teaching object oriented C++ to beginners, it's common to focus on the high level stuff (encapsulation, polymorphism). What I'd like to see is for them to mix in a little bit of "and here's how you would implement polymorphism in C" -- then people see how it all comes together. Er, well, that's what I think :~)

  • Re:My answer (Score:2, Insightful)

    by Pheersome ( 116234 ) on Thursday August 11, 2005 @09:29PM (#13300007)
    Hear, hear. My vote is definitely for Python. It's my language of choice in general, but it also has a lot of qualities that make it great for introducing to programming. A few of my favorites:
    • helloworld is literally a one-liner -- don't have to wrap it in a function (or, god forbid, a class *cough*Java*cough*) or import any I/O libraries
    • The syntax is ludicrously simple; eliminates bugs like "if(foo); {do_stuff();}"
    • The standard library is substantial and reasonably well-documented
    • After students have the basics (variables, conditionals, loops, functions, etc.), you can introduce OOP and/or functional programming
    The introductory programming course at my alma mater (a rigorous four-year math/science/engineering school) has been taught in Java for years, but it's being rewritten in Python. Go Python!
  • Re:consider Python (Score:5, Insightful)

    by sgant ( 178166 ) on Thursday August 11, 2005 @09:47PM (#13300101) Homepage Journal
    I second the Python recomendation. It's a great language to learn concepts on and it's very powerful so it scales well when they get into higher level programming. Plus, it's cross platform on just about anything and everything that has a console.

    Give it a look. Tons of resources out there also.
  • Best Language (Score:5, Insightful)

    by deanj ( 519759 ) on Thursday August 11, 2005 @09:58PM (#13300159)
    The best language is the one that the teacher can teach well. If the teacher can't do a good job explaining the language, it doesn't matter how good the language is for programming... there will be a lot of kids in class that will be lost.
  • Re:Why not C? (Score:1, Insightful)

    by slubberdegullion ( 544119 ) on Thursday August 11, 2005 @10:03PM (#13300182)
    Seconded.

    The great thing about knowing C is that most other languages can be understood in terms of C - after all, a lot of compilers have been written in C. So when the kids learn perl-style pattern matching, they can think about how they'd implement it in C, and they'll have some idea of how it might work, what might be efficient/inefficient, etc.

    If you teach a language like Java, on the other hand, students will be more likely to view stuff like lists as "magic structures" with certain strengths and weaknesses which must be memorized. This is OK if the goal is to make something that works, but not if the goal is to understand.

  • by johnnliu ( 454880 ) on Thursday August 11, 2005 @10:12PM (#13300227) Homepage

    I agree highly with the point about assembly language. While I think no school should teach students to write serious programs in assembly, I'm shocked at the fellow programmers that I talk to today who have no real idea of what a 'memory overflow' really is, or why is it called a 'overflow', why not just 'insufficient memory'. They don't understand the differences between stack or heap, what is a null-pointer, and have difficulty in understanding concepts such as arguments pass-by-reference and pass-by-value (for object references).

    When they start to use Java or .NET, they can't understand what's so great about garbage collection, and when they write C++... Arrggh memory leaks galore (and/or segfaults), and then they ask - what is a segmentation fault? Why is it called a 'segfault'?

    While I had no particular love for assembly or compilers back in the university days when I 'had' to write them to graduate, looking back, they laid a foundations of understanding what exactly is going on in the machine. I'm grateful for that lecturer whose name I've forgotten in the particular choice of assignment. :)

    ---

    Anyway, I think people who want to take writing software seriously needs to know this stuff - sooner or later. It's like a carpentry artisan needs to know about wood, and not just about carving.

  • Re:consider Python (Score:2, Insightful)

    by try_anything ( 880404 ) on Friday August 12, 2005 @02:17AM (#13301463)
    I second Python. It's simple, it's a quick way to get to cool stuff, its features can be learned incrementally, and it's powerful enough to give the most interested kids a lot of room to grow and implement cool projects. If not Python, choose another language with:

    1. A REPL
    2. Simple, readable syntax
    3. Few and simple language features
    4. Enough libraries that beginners can do "cool" stuff with a little hand-holding.

    Of course, if you're teaching kids with brains, patience, and ambition, do them a favor and teach them something that will blow their minds, like Haskell. For a lot of kids, high school is the last time they'll have the patience and curiosity to do something that expands their mental repertoire but has no obvious immediate payoff. (Used to be college, but kids these days....)

    At the other extreme, if you know your students are lazy and likely to stick with one language their entire lives, I hear C works for that.

  • by DavidNWelton ( 142216 ) on Friday August 12, 2005 @02:20AM (#13301472) Homepage
    Java might be ok for some people - I think that's what AP Comp Sci classes use. However it has a few drawbacks:

    1) It doesn't "scale down" [dedasys.com] as well as languages like Python, Ruby, Tcl etc... So might not be as well suited for those who aren't as interested/motivated/quick on the uptake.

    2) It's kind of dubious, IMO, to be promoting a product of one company.

    In any case, that would leave us with the scripting languages, which I think are all worth considering for different reasons, and all have in common a faster, easier development cycle with no need to recompile each time.

    Python: clear, easy to read, and very general purpose. Good introduction to OO without beating you over the head with it or forcing you to adapt to it from day 1.

    Tcl: because of the interesting introspection that it has and uses for certain common programming tasks, I'm not sure it's the best to start with, but on the other hand, being able to create something *visible* on the screen with a few lines of code is pretty gratifying, especially for a beginner. (Python has Tkinter which is pretty good too, but slightly more complex to start with than regular old Tk).

    Ruby also seems like a good, reasonably generic language - I don't know it as well, but from a casual glance, don't like the (willful) resemblance to Perl in terms of the syntax. But I think you could do a lot worse - you'd certainly have some advanced concepts available to teach with it.

    If you teach them PHP, you're going to be teaching them web programming, basically. I'd stick to a more general purpose language (you can use PHP for general purpose tasks, but it's still really oriented towards the web).

    On the other hand, if you've got bright kids and are willing to explore something interesting, you might try languages like Smalltalk or Scheme, that introduce some really interesting ideas.
  • Re:consider Python (Score:3, Insightful)

    by bit01 ( 644603 ) on Friday August 12, 2005 @05:42AM (#13302114)

    ... the One True Way, tabs.

    Tab characters, as distinct from the tab key, are nothing more than a primitive and error prone text compression method. They should've been put out to pasture years ago.

    ---

    I love the free market zealots think monopoly is a good thing.

  • Re:Scheme (Score:3, Insightful)

    by Intron ( 870560 ) on Friday August 12, 2005 @10:12AM (#13303518)
    "The can learn some really interesting concepts."

    Like how to count parens? I spent a lot of time doing:

    1 2 3 3 3 3 2 2 3 4 4 3 3 3 2 1
  • Re:Functional? (Score:3, Insightful)

    by IpalindromeI ( 515070 ) * on Friday August 12, 2005 @10:32AM (#13303712) Journal
    I would contend that it's much easier to move from functional to procedural than the other way. Witness the teeming masses of procedural programmers that end up saying, "Well I tried looking into some of that functional stuff because it sounded interesting, but it's just too weird. I can't get my head around it." I know some very bright programmers who have a lot of difficulty with the functional style because they're so used to procedural.

    In contrast, I think anyone could pick up procedural programming if they had already learned a different type. It's basically just typing out instructions for the computer to perform. And I'm not a functional programmer trying to disparage the procedural method. I've been programming in C++ and Perl for years and only recently started feeling comfortable with Haskell.

    I think the biggest disadvantage to teaching functional first is that functional languages usually have more features to offer than procedural languages, so it can be a bit frustrating sometimes moving in that direction.
  • Re:consider Python (Score:3, Insightful)

    by gstoddart ( 321705 ) on Friday August 12, 2005 @11:16AM (#13304074) Homepage
    Quirky? How so? The using of whitespace/indentation for meaningful things really only encourages good programming and readable code. As long as you don't mix tabs and spaces (i.e. use a decent text editor that allows you to replace tabs with a group of spaces) the mandatory indenting is a fantastic thing.

    I guess that's an opinion, and a lot of python programmers claim that.

    The last time I used a language in which whitespace was significant syntactically, it was friggin' COBOL. From my perspective, I find pythons indenting rules to be just a horrible idea and seems broken.

    And I've seen C code written by python programmers who keep to that convention ---- it was some of the shittiest code I'd ever seen.

    YMMV, but for me, having whitespace be syntactically significant is just BAD!
  • Re:consider Python (Score:5, Insightful)

    by gstoddart ( 321705 ) on Friday August 12, 2005 @11:23AM (#13304149) Homepage
    It's quirky in that it allows both spaces and tabs to be used interchangeably, instead of forcing indentation to be done the One True Way, tabs.

    But there isn't One True Way.

    Or you end up with some abortion of how the text is written to the file, and therefore wrong. Emacs, for example, will not write out a single tab for each level of indent. It will collapse them all down to a single character to be space efficient.

    Then you have the encoding for how many levels of indent you actually have being encoded in an editor-specific method. So things like vi, cat, less, lpr (or notepad and printing if you're on windows) don't know how to interpret the content.

    I've had this argument with my co-workers -- some like two spaces indent, we had standardized on 4, but when edited by some editors, it crapped back a broken representation of the string because it was 'cleverly' encoded --- and it was incompatible with other editors.

    This is why whitespace chars shouldn't be interpreted as being syntactic, nor should they be stored in the file in an incompatible way.
  • Re:Noooooo! (Score:5, Insightful)

    by Nutria ( 679911 ) on Friday August 12, 2005 @11:17PM (#13309443)
    The C version is far more concise.

    I spit in the general direction of "conciseness", and it's kinsman "cleverness".

    To quote Kernighan:
    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

    I used to be a clever programmer, but then I graduated and got a Real Job, and had to read the code written by both Clever and Grown-up programmers. Guess which code was easier to modify, debug and add functionality to. Guess which code had less bugs.

    A good (but not huge!) dose of verbosity and simplicity would go a long way towards making more robust applications.

    Another relevant quote, by Jeff Polk, co-creator of CVS:
    There's no obfuscated Perl contest because it's pointless.

  • by Anonymous Brave Guy ( 457657 ) on Saturday August 13, 2005 @12:17AM (#13309629)
    YMMV, but for me, having whitespace be syntactically significant is just BAD!

    That was my initial reaction when I first met Python: sacrilege!

    In many other block-structured languages it's customary to indent but the {} or begin...end markers are the syntactically significant things. Unfortunately, when humans read the code, it's actually the indentation they use to parse the logic most of the time, as many a new C student has learned via the standard deviously indented if...if...else demonstration.

    On reflection, that means having the indentation not be significant, yet using other markers that are, is a bit like putting a banner comment at the top of every function with the function name in it: it's fine if you copy it in properly, but it doesn't really help, and it's a maintenance hazard that can actually harm readability if it's changed incorrectly.

    Punctuation in a programming langauge is good, exactly up to the point that it stops increasing readability and/or reducing errors. After that, it's just clutter. So IMHO the question is whether (from some objective, analytical point of view) ignoring whitespace and introducing {} or begin...end markers improves readability or reduces bug count for programmers using the language. I suspect the answer really is a matter of taste: for some programmers it will, and for some it won't.

    This is why not everyone agrees on whether syntactic whitespace is a good or a bad thing. There just isn't a single, universal right answer to the question.

  • by Sad Loser ( 625938 ) * on Saturday August 13, 2005 @10:04AM (#13310995)

    I think that introducing the beginner to Brainfuck [wikipedia.org] is highly likely to mutilate them (or at least induce them to self-mutilate).

    On a more serious note, I think that to most (non geek) people, computer = Interweb so a programming language that has the ability to output html is preferable. This would mean that they can show off their work to friends, which has a powerful re-inforcing effect in itself.

    Although I like PHP, it sounds like Python has the edge in that it is more flexible in this regard

"What man has done, man can aspire to do." -- Jerry Pournelle, about space flight

Working...