BASIC vs. C (BASIC wins, obviously)

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Thu Apr 16, 2009 4:49 am UTC

I'm not talking about a BASIC with an ide. It just happens that the documentation for the compiler is quite good and complete. The problem with C compilers, even with good IDEs the whole standard is so out there, so many awkwardnesses piled on each other, that unlike a BASIC where you can actually sit down and read the manual in an afternoon if you're so inclined. C, by contrast, is so spread out that documentation for all practical intents and purposes relies on prior knowledge. You might argue that a programmer should know that already, and I respond by saying "what the hell is documentation for if you already know everything?"

Back in high school, I figured the syntax for C was ridiculously easy(It's poorly designed and unintuitive, but there's nothing inherently difficult about any of it), there was no reason I couldn't pick it up and do something with it, as I had done in other languages. Suddenly, the futility of my task became obvious. Reading the documentation, the insane monolith that it was, didn't help explain anything. It was written for someone who already knew everything about the language, as almost all C documentation is. The completely decentralized nature of the language is a strength, but also a weakness. If I want to create a simple graphics window, what do I do? Nothing. You can read the IDE manual from front to back, and it'll never tell you want you need to know. Only by asking Google the question will you learn that tinyptc, sdl, or allegro are probably your best choices. Then people wonder why I ask Google so much when it comes to C.

User avatar
phlip
Restorer of Worlds
Posts: 7565
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby phlip » Thu Apr 16, 2009 5:23 am UTC

SJ Zero wrote:I'm not talking about a BASIC with an ide.
Sorry, I took you at your word when you said:
SJ Zero wrote:When I'm using most dialects of BASIC, and other programming language with a well-defined command set, I press F1.


SJ Zero wrote:"what the hell is documentation for if you already know everything?"
Don't confuse a reference manual with a tutorial. They serve entirely different purposes. If you're learning a language, the first place to look is not the language reference... the man page for, say, malloc isn't going to help you figure out how memory management works. But if you can't remember whether it's memset(void*,size_t,int) or memset(void*,int,size_t), then the reference manual is ideal. This is hardly unique to C.
What is possibly unique to C is that reference manuals are very easy to find, and many compilers and most IDEs ship with them... but tutorials can take digging to find. Compare that to something like Python, which ships with neither (well, there's help() and friends, but that's not quite the same thing as a full reference)... the language reference is on the website, as is a bunch of tutorials, given equal footing. But that doesn't mean the C reference should take the place of tutorials, and it certainly doesn't reflect on the learnability of the language itself.
I'm sorry that you felt the need to teach yourself C using just a language reference, but one anecdote does not an argument make.

As for your example of creating a GUI window, and looking in the C manual... that makes about as much sense as wanting to learn how to search Google and looking in the Firefox manual. Any decent C tutorial will point out the difference between the standard library (small though it may be) and external libraries (be it Win32API, xlib, SDL, whatever)... that those external libraries have external documentation shouldn't be surprising. Besides, every IDE I've used includes documentation for common libraries... the Linux programming reference includes all of POSIX, every Windows IDE I've used has at least included docs for Win32API. If you're actually saying that the IDE docs should include bits telling you what external libraries you should be using (SDL vs Allegro vs whatever) then... why?

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: BASIC vs. C (BASIC wins, obviously)

Postby qbg » Thu Apr 16, 2009 2:43 pm UTC

SJ Zero wrote:That's how the nimda virus attacked Microsoft webservers. A number of Ns to overflow the buffer. A safe programming environment would catch that. It would be 'less powerful', but your foot would be intact.

...and had it occurred to you that maybe you just hadn't seen proper BASIC code before? The only modern feature I use that didn't exist in QB is pointers. The rest works just fine in QB -- I know because a lot of my code is re-used right from there.

You could try to emulate pointers in QB; you were able to get the address of a variable, and then you can use peek/poke to read and write values there...

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Thu Apr 16, 2009 4:31 pm UTC

I was referring to it syntactically.

my JRPG engine used POKE, IN and OUT for the entire graphics system. I got some of the best real-time graphics and control possible in Pure QB. I'm referring specifically to pointer notation, which I use extensively in my games in areas where I'm working with libraries like SDL.

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: BASIC vs. C (BASIC wins, obviously)

Postby OOPMan » Tue Apr 21, 2009 8:16 am UTC

SJ Zero wrote:It's 2009. COBOL is in, and "NOT (a OR b)" is readable by humans, while "!(a||b)" is robot speak. As I mentioned in my first post, programming languages should be tools that make it easier, not harder for humans to talk to the computer. The computer doesn't need help. This is also why longer but more understandable keywords are a positive thing.


Fixed that for you...

Less = More. This goes for keywords too.

Me, I'm busy wondering if the OP is taking the piss, since I personally don't think he can actually be serious...
Image

Image

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 12:18 pm UTC

Sure, if it's 1980. For a guy whose namesake represents the ultimate in wasteful but readable/reusable coding practices, I wonder if it's you who are taking the piss.

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: BASIC vs. C (BASIC wins, obviously)

Postby OOPMan » Tue Apr 21, 2009 1:07 pm UTC

Having read your thread more thoroughly, it seems you are serious.

Your arguments in favour of BASIC are amusing but ultimately miss the point.

For problems that require the application of C-style approaches we have C, C++
and DMD.

For problems that do not require the application of C-style approaches we have
a plethora of lanuages, the best of which (Python, Ruby, Haskell, Common LISP, JavaScript)
are all vastly superior to BASIC dialects on numerous levels.

In this situation BASIC is best left as that old friend from the 1980's that got us into
coding when we were too young to understand pointers.
Image

Image

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 1:13 pm UTC

It's as if....

"Any religious war is at its heart a bunch of trolls. Seriously. C? Why would I even bring a dying language into this if it wasn't meant as troll/flamebait?

If I wanted a legitimate debate, it should be Java, Python, or C# versus BASIC, because any debate regarding C has long since concluded and the programming world has spoken -- C lost about the same time every Windows 2000 computer on the planet was hacked by 32 Ns."

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: BASIC vs. C (BASIC wins, obviously)

Postby OOPMan » Tue Apr 21, 2009 1:18 pm UTC

Dude, BASIC isn't even in the runnings when compared to other nice languages (Python, Ruby, etc)...

As for C dying out, I doubt that will happen for a long-time because, unlike BASIC, it fills an actual niche.

Seriously, I think none of us know exactly what you're smoking but we all want some of that because it seems to do great things for you :-)
Image

Image

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 1:22 pm UTC

Pretty ignorant to say BASIC doesn't have a niche. Piss-taking aside, I know an army of engineers and tradesmen who would strongly disagree with you.

Seriously though, C is for all practical purposes dead. Can you even NAME a C compiler? all the modern compilers I can think of are C++ compilers that happen to have backwards compatibility.

User avatar
phlip
Restorer of Worlds
Posts: 7565
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby phlip » Tue Apr 21, 2009 1:23 pm UTC

lcc

Used it (specifically, lcc-win32) in my first paid programming job.

Your point?

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: BASIC vs. C (BASIC wins, obviously)

Postby OOPMan » Tue Apr 21, 2009 1:26 pm UTC

SJ Zero wrote:Seriously though, C is for all practical purposes dead. Can you even NAME a C compiler? all the modern compilers I can think of are C++ compilers that happen to have backwards compatibility.


How is that even relevant?

Also, embedded programming (A booming market if anything since more and more tech is going embedded) would seem to indicate that, if anything, C is experiencing something of a resurgance...

Finally, SourceForge would also seem to indicate that C is not exactly dead.

SJ Zero, you're anti-C rant seem to be grounded less in logic and more in personal prerefence that anything else. Which is fine but if you're going to run with your personal preferences at least make them OUTRAGEOUS personal preferences.

For example, if you said:

"Atari BASIC vs. C (Atari BASIC wins, obviously)"

we would have more ground to argue "seriously" with you...
Image

Image

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 1:39 pm UTC

Rant?

That's a stretch.

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: BASIC vs. C (BASIC wins, obviously)

Postby OOPMan » Tue Apr 21, 2009 1:47 pm UTC

Not really. Yout BASIC vs. C argument is basically that. You're comparing apples and oranges, pointedly ignoring the fact that you're doing so and ultimately your apple of choice isn't even a good one.
Image

Image

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 2:17 pm UTC

It's pretty difficult to take you, or anyone in this thread very seriously.

I've had to reiterate a number of points repeatedly, as if people weren't bothering to read my posts(In fact, am I going to have to repeat for a third time that I think C is good for low level programming? Really? A third time?). Worse, when I actually showed an example of a program in BASIC, people didn't know what they were looking at.

Maybe the reason everyone here loves shorthand so much is they don't have the attention span to actually read a sentence in English?

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: BASIC vs. C (BASIC wins, obviously)

Postby stephentyrone » Tue Apr 21, 2009 3:19 pm UTC

SJ Zero wrote:Can you even NAME a C compiler? all the modern compilers I can think of are C++ compilers that happen to have backwards compatibility.


clang. icc. gcc. gimme a cookie.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 4:27 pm UTC

No cookie. Those are C++ compilers. Like I said they'd be.

all the modern compilers I can think of are C++ compilers that happen to have backwards compatibility.


See?

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: BASIC vs. C (BASIC wins, obviously)

Postby Area Man » Tue Apr 21, 2009 4:55 pm UTC

You're comparing a family of languages with their IDEs to a language without IDE.
"The only modern feature I use that didn't exist in QB is pointers" - and I use C with OO templates, aka C++, aka a different language.

SJ Zero wrote:There's a very good reason that even C and C++ combined (as they often are) aren't the top programming language. It's a horrible platform, and while BASIC isn't the top anymore

You FAIL hard yet again. BASIC isn't even visible, or... are you including VB (VBA, ASP, .net?) in this malformed comparison?

Can you even name any common, widely used BASIC applications? pref. something from this century.

I think the name says it all: Beginner's all-purpose symbolic instruction code - presumably you're expected to eventually step off the short bus, and learn something more apropos. A learning language (for those who don't take formal education in programming), being compared to a systems programming language for engineers -- you ARE taking the piss.

re: compilers - is gcc a c++ compiler that has FORTRAN "compatibility", or can we just say that it compiles it therefore is a FORTRAN compiler? Maybe it's an Ada compiler with C++ compatibility...


Oh, and: Your mother ... passed on her fuzzy thinking and a lack of coherent logic to at least one of her children.
Bisquick boxes are a dead medium.

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: BASIC vs. C (BASIC wins, obviously)

Postby stephentyrone » Tue Apr 21, 2009 4:56 pm UTC

SJ Zero wrote:No cookie. Those are C++ compilers. Like I said they'd be.


No, they're not.
  • clang is explicitly the C LANGuage front end for LLVM, and does not even support c++ at present.
  • gcc is a name for both a collection of compilers, and a c compiler within that collection. g++ is the c++ compiler.
  • icc, again, is a name for both a compiler collection and the c compiler in that collection. ipp is the c++ compiler.

What you should have said was "I said all modern compilers", which would have at least disqualified gcc. You fail the religious war.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: BASIC vs. C (BASIC wins, obviously)

Postby headprogrammingczar » Tue Apr 21, 2009 5:32 pm UTC

But then we would start arguing about what "modern" means and then someone will say "LISP, bitches", ending the thread. It is much more fun to continue arguing on the assumption that BASIC is anything other than Baby's First Program.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: BASIC vs. C (BASIC wins, obviously)

Postby stephentyrone » Tue Apr 21, 2009 5:54 pm UTC

headprogrammingczar wrote:someone will say "LISP, bitches", ending the thread.


First, you just said it.
Second, I don't think for a moment that it's going to stop the force of nature that is SJ Zero's dislike of C.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: BASIC vs. C (BASIC wins, obviously)

Postby headprogrammingczar » Tue Apr 21, 2009 8:46 pm UTC

stephentyrone wrote:
headprogrammingczar wrote:someone will say "LISP, bitches", ending the thread.


First, you just said it.
Second, I don't think for a moment that it's going to stop the force of nature that is SJ Zero's dislike of C.

How about the group of BASIC haters so large it practically has its own cardinality?
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 9:00 pm UTC

Force of nature vs. organized religion? I like those odds.

C is teh suxxorz!

fazzone
Posts: 186
Joined: Wed Dec 10, 2008 9:38 pm UTC
Location: A boat

Re: BASIC vs. C (BASIC wins, obviously)

Postby fazzone » Tue Apr 21, 2009 9:48 pm UTC

You mention C experience, exactly how good/experienced at C were you, or how long have (had) you been working with it?

I like the data-structure/algorithm implementation metric I've heard before here. Were you like (from memory completely, no google) (listed in ascending order I think)

gratuitous use of goto bad?
Forget break statements in switch cases bad?
Use char * pointers as unlimited storage with no malloc/free bad?
Forget to free malloc'd pointers bad?
Implement string functions (strlen, strcpy, strncpy, strdup, etc) good?
Implement bubble sort with value-based storage good?
Implement insertion sort with pointer-based storage good?
Implement qsort good?
Implement printf good?
Implement red-black tree good?
Implement Dijkstra's Algorithm good?
...
frequent contributions to the Linux kernel good?
*/

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Tue Apr 21, 2009 10:16 pm UTC

Sort of silly using a data structure/algorithm test, considering anyone with half a brain should be able to implement the same algorithms in any language that gives you the tools. The real question is how much of a pain in the ass it'll be. I much prefer working with strings in BASIC over C, for example, but other than the increased ass-pain, there's no reason you can't work with strings in C if you know the first thing about the language.

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: BASIC vs. C (BASIC wins, obviously)

Postby stephentyrone » Tue Apr 21, 2009 10:23 pm UTC

headprogrammingczar wrote:How about the group of BASIC haters so large it practically has its own cardinality?


Pfft. It hasn't even overflowed 32 bits yet.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

fazzone
Posts: 186
Joined: Wed Dec 10, 2008 9:38 pm UTC
Location: A boat

Re: BASIC vs. C (BASIC wins, obviously)

Postby fazzone » Tue Apr 21, 2009 10:30 pm UTC

Good job dodging the question, and yes, that's true, in theory.

But not every C programmer could (for example) implement a complete version of printf, could you? And there's only a select few C programmers who contribute regularly to the Linux kernel. Like on a scale of zero=gratuitous goto and 100=frequent kernel contributions, how would you rate yourself? I'd rate myself at about 60 or so, not green enough to make stupid mistakes, but not good enough to code a device driver, and not nearly good enough to understand the Linux kernel source.
*/

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: BASIC vs. C (BASIC wins, obviously)

Postby stephentyrone » Wed Apr 22, 2009 1:25 am UTC

fazzone wrote:and not nearly good enough to understand the Linux kernel source.


Truly excellent programmers produce code that you understand immediately, but cannot understand how anyone would ever come up with such a way to express it. This suggests that the Linux kernel writers are mediocre coders at best =)

(Exaggerating because this is Religious Wars, but I really don't think that Linux kernel devs are the end-all-be-all of C hackers)
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

Doodle77
Posts: 107
Joined: Mon Mar 26, 2007 9:46 pm UTC

Re: BASIC vs. C (BASIC wins, obviously)

Postby Doodle77 » Wed Apr 22, 2009 2:00 am UTC

SJ Zero wrote:Can you even NAME a C compiler? all the modern compilers I can think of are C++ compilers that happen to have backwards compatibility.

gcc.
It's as much a C compiler as it is a FORTRAN compiler.

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Wed Apr 22, 2009 5:06 pm UTC

I think that's a terrible metric because unless you're in a classroom, it's not a "1 2 3" progression. You can contribute non-trivial amounts of code to open source projects simply by making something worth including, not necessarily through some incredible coding skill. Likewise, something like implementing printf can be short-circuited by simply specialising in strings(I might be wrong, but it looks like a big string manipulation routine that parses the string, making any changes that need to be made, before calling the OS console(or interrupt, in the case of working with MS-DOS/BIOS) output routine.

I guess the question at the end of the day is "Can you solve the problems you need to?", in which case my answer is "Yes, definitely".

As an aside, optimizing a ModeX drawing loop in QB was incredible. To write one pixel you need to divide, multiply, add, and write to a port. You can bring that way way down, to just 4 port writes for the whole screen, a boatload of adds, and a bit shift every column. You haven't lived until you've tried making that old compiler do anything in real-time without crazy shortcuts.

No easier in C, but having a bit shift built into the language was nice. I'm happy FB finally included it.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: BASIC vs. C (BASIC wins, obviously)

Postby headprogrammingczar » Wed Apr 22, 2009 6:08 pm UTC

SJ Zero wrote:I guess the question at the end of the day is "Can you solve the problems you need to?", in which case my answer is "Yes, definitely".

The point everyone else is making is that C solves more problems than BASIC assuming equal knowledge of both languages.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Wed Apr 22, 2009 6:13 pm UTC

ASM solves more problems than C, assuming equal knowledge of both.

fazzone
Posts: 186
Joined: Wed Dec 10, 2008 9:38 pm UTC
Location: A boat

Re: BASIC vs. C (BASIC wins, obviously)

Postby fazzone » Wed Apr 22, 2009 6:50 pm UTC

SJ Zero wrote:having a bit shift built into the language was nice. I'm happy FB finally included it.

C has had a bit shift operator since K&R.
*/

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: BASIC vs. C (BASIC wins, obviously)

Postby stephentyrone » Wed Apr 22, 2009 7:08 pm UTC

SJ Zero wrote:ASM solves more problems than C, assuming equal knowledge of both.


Unless you require that your solution be portable.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

User avatar
Amnesiasoft
Posts: 2573
Joined: Tue May 15, 2007 4:28 am UTC
Location: Colorado
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby Amnesiasoft » Wed Apr 22, 2009 7:12 pm UTC

SJ Zero wrote:ASM solves more problems than C, assuming equal knowledge of both.

Inline assembly.

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Wed Apr 22, 2009 9:20 pm UTC

I've already covered the myth of C portability.

Java is somewhat portable, "write once, compile once run anywhere".

Well written basic is somewhat portable, "write once, compile anywhere".

C is not portable. "Write once, then write again in an #ifdef, compile anywhere you've got an #ifdef for".

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: BASIC vs. C (BASIC wins, obviously)

Postby ash.gti » Wed Apr 22, 2009 9:53 pm UTC

Using C and the C standard library is completely portable, it only gets tricky when you need OS specific stuff or implementation specific stuff.

And if you don't like dealing with that, then don't. Leave that to the real programs and you can go play with your basic and be content.

*edit*
There are many places where basic is impractical and there are many places where you need things like the speed C has to offer. Yes, you can get away with doing it in any ole' language but a device driver should be small and specific without all the fluff your <insert favorite language> offers and C and ASM offer ways of doing exactly that without much hassle.
Last edited by ash.gti on Wed Apr 22, 2009 10:28 pm UTC, edited 1 time in total.
# drinks WAY to much espresso

User avatar
Amnesiasoft
Posts: 2573
Joined: Tue May 15, 2007 4:28 am UTC
Location: Colorado
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby Amnesiasoft » Wed Apr 22, 2009 10:17 pm UTC

ash.gti wrote:it only gets tricky when you need OS specific stuff or implementation specific stuff.

And this one very well applies to things like Java too. As far as I could find, the only way to clear the console in Java was through system specific calls.

User avatar
netcrusher88
Posts: 2166
Joined: Mon Mar 26, 2007 4:35 pm UTC
Location: Seattle

Re: BASIC vs. C (BASIC wins, obviously)

Postby netcrusher88 » Thu Apr 23, 2009 3:10 am UTC

SJ Zero wrote:Well written basic is somewhat portable, "write once, compile anywhere".


PowerBASIC website: "We support both DOS and Windows." That's not portable, that's obsolete.

For the record, "portable" doesn't mean a Windows desktop and a Windows laptop. Portable means an x86 Windows box, a PPC OS X box, an ARM Linux box, and a MIPS let's go with netBSD box. Portable also doesn't mean that it magically works everywhere. The suffix -able means particularly susceptible or inclined to a state or action - debatable, changeable. Portable means that it is inclined to porting, meaning in this instance that the #ifdef statements for architecture-dependent code are in fact portable - they make the C portable by conveniently defining chunks that need to be replaced.

Notably C is somewhat more difficult to port between major architectures, despite that there are now mostly only two (POSIX and win32). Pales in comparison to the difficulty of porting something that doesn't even have a compiler on the various *NIXes.
Sexothermic
I have only ever made one prayer to God, a very short one: "O Lord, make my enemies ridiculous." And God granted it. -Voltaire
They said we would never have a black president until Swine Flu. -Gears

User avatar
SJ Zero
Posts: 740
Joined: Wed Sep 03, 2008 3:10 pm UTC
Contact:

Re: BASIC vs. C (BASIC wins, obviously)

Postby SJ Zero » Thu Apr 23, 2009 12:04 pm UTC

QuickC only supports DOS. C is so obsolete!!!

As for the embedded/device driver thing, how many times do I have to repeat myself before you guys actually bother reading what I'm writing? I covered hardware programming in my first freaking post.


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 4 guests