clean minimalistic Quake C for schools
Moderator: InsideQC Admins
20 posts
• Page 2 of 2 • 1, 2
Re: clean minimalistic Quake C for schools
daemonicky wrote:Quake C si simple. I though about what is bare bones Quake C.
Yesterday I thought that Quake C could be taugh at schools. Most likely secondary education ones. I mean, it is OOP and quite in the spirit of original OOP http://userpage.fu-berlin.de/~ram/pub/p ... kay_oop_en
I think you're confused. QuakeC is not in the spirit of original OOP (nor is it in the spirit of classic C). Not by the definition of Dr. Alan Kay. Where are the classes? Where are the objects? Is there a state messaging system? Encapsulation? I don't think so. There is only one global class that may have its properties expanded upon.
I don't think teaching QuakeC in school is a particularly good idea. It teaches bad programming practises. Ridiculous use of global variables. Far too many weird idiosyncratic features for it to be a worthwhile first language. It may be fine in the hands of a seasoned veteran, but I think that all you're going to teach is how to follow some tutorials.
Last edited by DolphinsOfCydonia on Sun Feb 05, 2012 9:38 am, edited 3 times in total.
- DolphinsOfCydonia
- Posts: 21
- Joined: Tue Nov 08, 2011 4:01 am
Re: clean minimalistic Quake C for schools
DolphinsOfCydonia wrote:nor is it really in the spirit of classic C, really. Not by the definition of Dr. Alan Kay. Where are the classes? Where are the objects? Is there a state messaging system? Encapsulation? I don't think so. There is only one global class that may have its properties expanded upon.
C doesn't have any of that stuff. Perhaps you are thinking some other language with a couple of plus signs after the letter.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: clean minimalistic Quake C for schools
- DolphinsOfCydonia
- Posts: 21
- Joined: Tue Nov 08, 2011 4:01 am
Re: clean minimalistic Quake C for schools
qc has inheritance, it has virtual functions, how does that prohibit OO coding?
we can make it more like pascal instead, if you would prefer that?
while you'd not focus a degree upon quakec, it might actually be quite useful if it was taught within the first year of a degree - however, it would *need* to be cleaned up a heck of a lot to remove all the globals...
the absolutely great thing about quakec is that a) its fairly simple, no pointers, structures, etc keeps the syntax simple. b) its results are highly visual - you can make a change and directly see the difference that it makes. c) its for a friggin game - makes it far more interesting for idiots who don't want to work.
Frankly, all the caveats will at least teach students that no language is perfect, which will hopefully avoid all the MUST USE CLASSES EVEN FOR A SINGLE LINE OF CODE!!! fanboyisms, because that sort of thing makes code utterly unreadable.
we can make it more like pascal instead, if you would prefer that?
while you'd not focus a degree upon quakec, it might actually be quite useful if it was taught within the first year of a degree - however, it would *need* to be cleaned up a heck of a lot to remove all the globals...
the absolutely great thing about quakec is that a) its fairly simple, no pointers, structures, etc keeps the syntax simple. b) its results are highly visual - you can make a change and directly see the difference that it makes. c) its for a friggin game - makes it far more interesting for idiots who don't want to work.
Frankly, all the caveats will at least teach students that no language is perfect, which will hopefully avoid all the MUST USE CLASSES EVEN FOR A SINGLE LINE OF CODE!!! fanboyisms, because that sort of thing makes code utterly unreadable.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: clean minimalistic Quake C for schools
Spike wrote:qc has inheritance, it has virtual functions, how does that prohibit OO coding?
we can make it more like pascal instead, if you would prefer that?
while you'd not focus a degree upon quakec, it might actually be quite useful if it was taught within the first year of a degree - however, it would *need* to be cleaned up a heck of a lot to remove all the globals...
the absolutely great thing about quakec is that a) its fairly simple, no pointers, structures, etc keeps the syntax simple. b) its results are highly visual - you can make a change and directly see the difference that it makes. c) its for a friggin game - makes it far more interesting for idiots who don't want to work.
Frankly, all the caveats will at least teach students that no language is perfect, which will hopefully avoid all the MUST USE CLASSES EVEN FOR A SINGLE LINE OF CODE!!! fanboyisms, because that sort of thing makes code utterly unreadable.
Huh... I love programming in QuakeC, but I can't see it as OOP. It's a very efficient script language, oriented to work over an array of fixed size entities. Declare a "foo" field to an entity type, and this field will exist in all the others, regardless what relationship (if any) exists between the types. You cannot even use it to teach about a real object oriented model like what's used in C#, Java or any other modern commercial language.
That said, QuakeC surely has a big appeal to students. It has a simplicity that remembers me when I started to learn C programming in DOS. Everything was clear and easy to understand (want to draw in the screen ? Change to a graphic mode doing this, access the VGA video memory at this address, draw a box filling the memory this way, etc). To do the same in Windows you'll need a ton of SDK's and libraries and frameworks.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
20 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest