none
No parameters for subs and no functions?? RRS feed

  • General discussion

  • WTF?? How are people supposed to learn real programming like that?!?!

    (And also no sockets - a shame...)
    Sunday, February 15, 2009 10:01 AM

All replies

  • And there's no direct bit manipulation either, no assembler provision, no control over the interrupt masks or flags. It's horses for courses. I'm  sure you didn't learn to read starting with the "Complete Works of Shakespeare".  We all have to start somewhere. Let people have fun learning. They may decide that Small Basic is too restrictive for them and move on to another language, but that is their choice. They may then start to criticise Small Basic for its quirks and deviations from received wisdom, but by then Small Basic will have done its job. If you have any remaining shred of an idea of using Small Basic, it also has GOTO!
    Sunday, February 15, 2009 5:05 PM
  • Stendec said:

    They may decide that Small Basic is too restrictive for them and move on to another language, ...


    The fact that Small Basic has a single global scope along with the rest of its restrictions is a serious feature, not a bug. Think about all of the Horrors that were been laid on the software community by the the first MS BASIC compiler. And at the risk of being booed as a heretic, even Visual Basic with all its many fans misses the point. It is in the name: Beginners All-purpose Symbolic Instruction Code. Basic was originally dreamed up by a professor at Dartmouth that was tired of cramming FORTRAN and assembler down the throats of beginners. It was never meant to be the language you devoted your career to. Match this with the mentality of "Don't teach them bad habits" and you see why there hasn't been a decent teaching tool like SmallBaisc for years.

    Let SmallBasic be what it is trying to be: easy to use. You can teach them about scope, parameters and the evils of the Goto command when they sign up for their first college programming course.


    Sunday, February 15, 2009 7:19 PM
    Answerer
  • Coding Cat said:

    Let SmallBasic be what it is trying to be: easy to use. You can teach them about scope, parameters and the evils of the Goto command when they sign up for their first college programming course.

    Agreed! I've got a few languages under my belt, but I like the simplicity of SB because it makes writing little scripts fun. If the community continues to create extra libraries that increase SB's capabilities (adding interfaces to popular services, XML parsing, etc.), SB could be a programming language for non-programmers the way BASIC was way-back-when.

    Remember that SB is very extensible.  Just because it doesn't come with feature X right now, doesn't mean it can't be added.

    Andrew Burton - http://profnano.org
    Sunday, February 15, 2009 10:39 PM
  •  If you look at the code in the Tetris program and look at how the programmer has setup his calls to the subroutines you can see that he sets up his variables before the call and right after the call he has a variable which is like a return value from a function.  On the line that he does the call he shows you via a tailing comment what he is doing. 

    So, in the call below he is taking the variable template into the subroutine Createpiece and he is returning the variable h.  I thought this was a great way to replicate and show what a function call would be. 

    CreatePiece() ' in: template  ret: h

    JR
    Monday, February 16, 2009 1:16 AM
    Answerer