Programming language questions

Off topic discussion.
User avatar
Tetsuwan Penguin
Robot Revolutionary
Posts: 4714
Joined: 11 years ago
Location: Chelmsford, Ma
Contact:

Postby Tetsuwan Penguin » 10 years ago

C++ is actually C with functions added to structures (which are then called 'classes'). Some type rules are stricter in C++ then in C, but otherwise you could compile actual C code in C++ and it would function. C++ is a superset of C.

Object oriented programming is an entirely different concept, and there are various ways of doing this. C++ is only one way. C# and Java are very similar, differing in rules and syntax somewhat. In general once you learn C you can pick up the object oriented structure of C++, and then learn what makes C# and Java different. It can get confusing keeping all four in your head at the same time!
[sigpic][/sigpic]Image

:tenma: I'm on Fanfiction.net as Tetsuwan Penguin. Please check out some of the other stories I've written! ;)
https://www.fanfiction.net/u/4672860/Tetsuwan-Penguin

I can also be found on Deviant Art http://tetsuwanpenguin.deviantart.com/

My home page
http://scharkalvin.weebly.com/about-me.html

User avatar
AprilSeven
Silent Song
Posts: 3783
Joined: 14 years ago
Location: Orange County, NY

Postby AprilSeven » 10 years ago

Does anyone remember programming in Basic? Way, way back IIRC on the Radio Shack computers (was it the TRS 80 - YES! I just Googled it up!). Our family had one of those and I did a little work in Basic on that. My brother Paul -- who is now a software engineer -- was about 12 back then -- glomped onto the machine and became very adept at creating little programs. He and my youngest brother both got into coming up with all sorts of goofy, funny things.

Then there was the Commodore 64 - with the GEOS operating system that did an amazing job of mimicking the "new" Macintosh computer . . . eehhh - sorry went off topic!
Image Sig artwork by Alittleacorn!

User avatar
Tetsuwan Penguin
Robot Revolutionary
Posts: 4714
Joined: 11 years ago
Location: Chelmsford, Ma
Contact:

Postby Tetsuwan Penguin » 10 years ago

Somewhere on my computer (or maybe on some floppies buried someplace) I have the entire "101 basic games" programs from the book by the same name from the '70's. I wrote some simple computer games in basic while in college. I think there is a basic that runs on Linux.
[sigpic][/sigpic]Image



:tenma: I'm on Fanfiction.net as Tetsuwan Penguin. Please check out some of the other stories I've written! ;)

https://www.fanfiction.net/u/4672860/Tetsuwan-Penguin



I can also be found on Deviant Art http://tetsuwanpenguin.deviantart.com/



My home page

http://scharkalvin.weebly.com/about-me.html

User avatar
fafner
Cosmic Ranger
Posts: 3522
Joined: 20 years ago
Contact:

Postby fafner » 10 years ago

There are a lot of BASIC dialects, many of them for GNU/Linux.

I would not advocate learning the old BASIC with line numbers, especially as a first programing language, because it is among the worst languages with respect to structured programing, and would cause one to "learn" bad ways of programing. The more recent versions are better with this respect as the numbers have become optional, and it is possible to write a program without using GOTOs everywhere :p irate:
The real sign that someone has become a fanatic is that he completely loses his sense of humor about some important facet of his life. When humor goes, it means he's lost his perspective.

Wedge Antilles
Star Wars - Exile

User avatar
AprilSeven
Silent Song
Posts: 3783
Joined: 14 years ago
Location: Orange County, NY

Postby AprilSeven » 10 years ago

:lol: So, you're saying Basic is Basically BAD!! :lol: :lol:
Image Sig artwork by Alittleacorn!

User avatar
Atomars
Rocket Ball Champion
Posts: 285
Joined: 13 years ago

Postby Atomars » 10 years ago

Thanks for all the replies guys, I am so busy I can't even visit ABO :d oh: .
Anyway, your replies have been really helpful to me :astro: , thanks a lot.

User avatar
fafner
Cosmic Ranger
Posts: 3522
Joined: 20 years ago
Contact:

Postby fafner » 10 years ago

"AprilSeven" wrote: :lol: So, you're saying Basic is Basically BAD!! :lol: :lol:

Yes, the old one, from an educational point of view :D Otherwise I had fun learning it and playing with it :p When I learned Pascal, I realized that I knew nothing, that was my "Socrate" moment :lol:
The real sign that someone has become a fanatic is that he completely loses his sense of humor about some important facet of his life. When humor goes, it means he's lost his perspective.



Wedge Antilles

Star Wars - Exile

User avatar
Tetsuwan Penguin
Robot Revolutionary
Posts: 4714
Joined: 11 years ago
Location: Chelmsford, Ma
Contact:

Postby Tetsuwan Penguin » 10 years ago

Basic was created as a low cost (memory wise) higher level alternative to assembler for beginning programmers. It's almost a scripting language in a way, and Bash, Perl, or Tck-Tkl are good substitutes.
The use of "Goto" isn't really a bad thing, what do you think the "jmp" instruction in assembler is? Basic overuses goto because most forms lack a computed branch (like C's switch statement). Line numbers save the code otherwise required to look up labels inside of the language processor, but some variants allow the use of labels.
[sigpic][/sigpic]Image



:tenma: I'm on Fanfiction.net as Tetsuwan Penguin. Please check out some of the other stories I've written! ;)

https://www.fanfiction.net/u/4672860/Tetsuwan-Penguin



I can also be found on Deviant Art http://tetsuwanpenguin.deviantart.com/



My home page

http://scharkalvin.weebly.com/about-me.html

User avatar
fafner
Cosmic Ranger
Posts: 3522
Joined: 20 years ago
Contact:

Postby fafner » 10 years ago

"Tetsuwan Penguin" wrote:The use of "Goto" isn't really a bad thing, what do you think the "jmp" instruction in assembler is?

The difference between Basic and assembler is that you can't go below assembler, it is the low-level, and most people don't use it (although technically this isn't really the low-level, there is microcode below). It's like tweaking the engine of your car: passionate people do it to gain a little here and there but most people just drive their car. Of course it is possible to do structure programming using only GOTOs if one really wants, as well in Basic than assembler.

In the end, GOTOs aren't inherently "good" or "bad". I admit I sometimes use a little GOTO here and there even in C : it is better to directly jump at the end of a long function rather than use a ton of boolean tests to skip code irrelevant to the situation (in case of an error detected in the middle of the super-heavy -and booooooring- initialization of a device for example, jump at the end and clean up the mess if the ok wasn't reached). What is important is what you do: write the code as cleanly as possible, as easy to read as possible, and above all maintainable, not only for the next guy but for you too because very often you are the "next guy" (well, at least for me). Anyway, even highly structured programs end up as a bunch of obscure assignments and jmps, everyone who has read an uncommented assembler listing (or a program disassembly) knows that :D

What I essentially meant is that GOTOs are bad from an educational point of view. Teaching how to use GOTO at junior programers is an open door to learning (and retaining) bad practice. Let them learn the basics (ha! the pun of death!), then teach them the more subtle ways. You don't learn to drive a car by doing skids :p irate:

GOTO is bad :p
Last edited by fafner on Sun Aug 04, 2013 2:06 pm, edited 1 time in total.
The real sign that someone has become a fanatic is that he completely loses his sense of humor about some important facet of his life. When humor goes, it means he's lost his perspective.



Wedge Antilles

Star Wars - Exile


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 58 guests