• Why am I learning Pascal?
    23 replies, posted
I've started a Games Development course at university this year and our teacher has insisted on teaching us Pascal as our 'first' language. Why? It's outdated, has no tendencies that relate to other languages and teaches you conventions that aren't really used elsewhere, here's an example: [code]program GuessNumber; uses SysUtils; function TestGuess(guess, num: Integer):Integer; begin if num = guess then begin result := 0; end else if num > guess then begin result := 1; end else if num < guess then begin result := 2; end; end; procedure EvalGuess(); var i, num, guess, fake: Integer; begin i := 1; WriteLn('I am thinking of a number between 1 and 100...'); Randomize; num := Random(100) + 1; while i < 8 do begin Write('Guess #', i,': '); Read(guess); fake := Random(100) + 1; case TestGuess(guess,num) of 0: begin WriteLn('Well done, the number was indeed ',num); Break; end; 1: WriteLn('Nope, the number is larger than ',guess, ' but it COULD be ',fake); 2: WriteLn('Nope, the number is smaller than ',guess, ' but it COULD be ',fake); end; WriteLn(''); i += 1; if i = 8 then begin WriteLn('Sorry, you have no more guesses left! The number was ',num); end; end; end; procedure AskAgain(); var input: Char; begin WriteLn(''); WriteLn('Do you want to play again?'); ReadLn(input); if input = 'Yes' then begin EvalGuess(); end; end; procedure Main(); begin EvalGuess(); AskAgain(); end; begin Main(); end.[/code] This program asks a user to guess a number from 1-100, the user gets 7 attempts then asks if they want to play again. It's slightly incorrect as it's incomplete, but it illustrates my point.
I have warm fuzzy memories of using FreePascal and Delphi in my early days, although looking back, it's a decrepit piece of shit.
I used C++ first, no idea what Pascal is.
Ah TurboPascal... good times...
Getting to know the way of thinking for a program, some programming concepts and most algorithms are quite independent from the programming language used. Should be easy enough to learn another language after that, easier than beginning from start.
[QUOTE=ZeekyHBomb;21362691]Getting to know the way of thinking for a program, some programming concepts and most algorithms are quite independent from the programming language used. Should be easy enough to learn another language after that, easier than beginning from start.[/QUOTE] This is right on the money. Although Pascal is shit, it still got me into programming and taught me that computers just crunch data, they aren't intelligent. Pascal was also intended to be an educational language rather than a real language, so that explains its verbose (and somewhat comforting :3:) syntax.
Did anyone start with Basic? Like QBasic. Also, I have an Amstrad at home and it's base on basic, that fascinates me.
Comodore Basic V2 :D
Ahhh BASIC. Good old times. You can't really do much with it nowdays though.
Yep, nothing practical at least but it's very simple to understand and I think it's a good tool to teach the basic concepts of programing.
[QUOTE=adzicents;21358280]It's outdated, has no tendencies that relate to other languages and teaches you conventions that aren't really used elsewhere[/QUOTE] Pascal is only as outdated as c, which is still widely used in places where c++ is overkill (embedded development, for example). Anyway, when you eventually learn c, you'll be surprised at the similarities. Or, if you skip directly to java or c#, you'll have a sense of how programming languages WITHOUT object-oriented functionality work. Also, Pascal has been updated over the years. There's ObjectPascal and Delphi, and now a Pascal compiler for the Microsoft .NET framework, so Pascal is still very usable these days.
I've only briefly heard of Pascal. Guess it's time to go read up on it.
[QUOTE=Darwin226;21365224]Did anyone start with Basic?[/QUOTE] Yes. Never used it since.
My school started us out with a full year of Java. I'm still learning it so I really haven't had time to delve into any other languages, but from what I can tell they all do the same thing, except with slightly altered syntax.
[QUOTE=phazmatis;21395188]Pascal is only as outdated as c, which is still widely used in places where c++ is overkill (embedded development, for example). Anyway, when you eventually learn c, you'll be surprised at the similarities. Or, if you skip directly to java or c#, you'll have a sense of how programming languages WITHOUT object-oriented functionality work.[/QUOTE] As far as I could see, Pascal had its last update in 1990, wheras the latest C standard is from 1999 and the next one is in development. Of course this doesn't mean, that Pascal is less of a programming language, I do not prefer C over it for this reason. There are derviates of Pascal, which are object orientated :) But don't you mean WITH object-orientated functionality? I mean, by learning Pascal (s)he should be able to understand how it works without.... [QUOTE=Chad Mobile;21396128]I've only briefly heard of Pascal. Guess it's time to go read up on it.[/QUOTE] Kind of an useless post :/
I started messing around with BASIC at first, then moved on to Borland Pascal at the beginning of my course. Now I'm undergoing C++ (personally ofc. since programming class now involves Visual Basic).
My first "language" was actionscript, so anything, even Pascal, is an improvement on that.
Why would you ever say that? AS isn't inferior to Pascal.
Where I come from there are still universities where you start your adventure with programming by learning Assembler. what-the-christ
All we learnt was what it is :v I guess it's fair enough to be using it, but why can't he have chosen a more dated programming language that still accomplishes the same teaching values?
Because the teacher only knows pascal? :D I'd say starting with qbasic or something safe like that is a great introduction to the basics of programming, but only if you have 0 other experience (like a lot of people going into those courses have). If you're in any way experienced with more powerful languages all it will do is make you frustrated.
[img]http://img.metokur.org/red/f2692e7fd41e491b1afdceace5fc373f.png[/img]
[QUOTE=__stdcall;21435857]Where I come from there are still universities where you start your adventure with programming by learning Assembler. what-the-christ[/QUOTE] Assembly is neat and all, but I would not recommend it as a first language.
Sorry, you need to Log In to post a reply to this thread.