Who here doesn't use C and why?

Programming, for all ages and all languages.
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Post by Craze Frog »

Image
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Craze Frog wrote:Image
....

As a coder, I would not have bought that keyboard.
My OS is Perception.
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Post by Laksen »

MessiahAndrw wrote:
Craze Frog wrote:(image)
....

As a coder, I would not have bought that keyboard.
I have a keyboard like that. Probably just like most of the rest of the computer users in Denmark.
It's great, really. But not for coding in a curly bracket language.

But that's ok with me. I code in Object Pascal :P
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

MessiahAndrw wrote:....

As a coder, I would not have bought that keyboard.
Seriously, if you write your native language, a specific keyboard might be a necessity. If I were german, I would want some easy method to type ß, without using Alt-2-2-5. And if that wasn't enough, try typing in japanese or greek for a change :twisted:

Seriously, expecting everybody to use an US keyboard is IMNSHO like denying people their culture.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Combuster wrote:
MessiahAndrw wrote:....

As a coder, I would not have bought that keyboard.
Seriously, if you write your native language, a specific keyboard might be a necessity. If I were german, I would want some easy method to type ß, without using Alt-2-2-5. And if that wasn't enough, try typing in japanese or greek for a change :twisted:

Seriously, expecting everybody to use an US keyboard is IMNSHO like denying people their culture.
So the main reason he's not using C is because its inconvenience on his keyboard.

If I lived somewhere with non-US-standard (same as the AU-standard here) keyboards, I'd buy two! A local one, and a US one. Not just for C coding, but in games that require you to press [ and ] quickly to switch weapons, etc.
My OS is Perception.
blound
Member
Member
Posts: 70
Joined: Sat Dec 01, 2007 1:36 pm

Post by blound »

I don't know what OS everyone uses but its very easy under linux (and probably anything running X, since its X based settings) to change keyboard mappings using xmodmap
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Post by Craze Frog »

If I lived somewhere with non-US-standard (same as the AU-standard here) keyboards, I'd buy two! A local one, and a US one.
Because it takes just 1 second to change a laptop keyboard, right? Also they are cheap and come in all variants that fit my computer, right?

blound, how do I change ctrl+alt to act as altgr with xmodmap?
thegreatseph
Posts: 12
Joined: Wed Dec 19, 2007 6:40 pm

Post by thegreatseph »

Well, to the person who asked for alternatives to C or for Operating System development, there are hundreds. I have never found something that I couldn't do in Pascal. In fact both languages are more similar in capability then most people realize. The biggest real difference that exists to me seems to be structure and how data is managed. Personally I love how strict pascal is when it comes to it's rules on data.

I don't think that this thread should be a flame against C, I know people get attached to their development tools and that is fine, but there is no need to flame C.

I think that Modula-2 or Oberon seem quite good too, especially for OS design, I really like well, how modular Modula-2 is. I used to do a bit of programming in it, however settled on pascal due to complete lack of tools available for Modula-2 (yes compilers are on all major platforms, however with not much source code available, and few up to date run time libraries).

I have written a few programs in C, but there is something I fail to understand about it that I have heard for years, I have always heard that it is a "lower level" language which makes it more suited to systems programming, but how is this so? how is it lower than pascal, or even BASIC? And wouldn't being lower level make it less portable? As I thought the lower meant less hardware abstraction.
GuiltySpark
Posts: 7
Joined: Sun Dec 16, 2007 9:47 am
Location: The (Other) Counterweight Continent

Post by GuiltySpark »

thegreatseph wrote:I have written a few programs in C, but there is something I fail to understand about it that I have heard for years, I have always heard that it is a "lower level" language which makes it more suited to systems programming, but how is this so? how is it lower than pascal, or even BASIC? And wouldn't being lower level make it less portable? As I thought the lower meant less hardware abstraction.
It's lower than BASIC because many BASIC dialects are interpreted.

C does have less hardware abstractions than languages like BASIC. I don't think C is classified as lower level than Pascal.

Yes, being lower level make it less portable. That's why C programs need (at least) to be recompiled to run on a different platform unless, of course, it's compiled to bytecode-like things like LLVM.
"Pissing people off since 1986."

"Edible: n, As in a worm to a toad, a toad to a snake, a snake to a pig, a pig to a man, and a man to a worm."
User avatar
ucosty
Member
Member
Posts: 271
Joined: Tue Aug 08, 2006 7:43 am
Location: Sydney, Australia

Post by ucosty »

I think it refers to how the language features are implemented. You can use the C language, with all it's features, without any runtime support. This is not the case with higher level languages.
The cake is a lie | rackbits.com
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

C/C++

Post by DeletedAccount »

Hi ,
I first learned BASIC ( QBASIC) then switched to C++ and later learned C , ASM , PASCAL , JAVA , C# , Python etc ... . I just want to state that it's the art of the programmer to write readable and reusable components than language's "capability " ... I have been using C/C++ for the past 7-8 years that its almost my second nature ...You can write unreadble programs even in pascal .... C++ in my opinion is a multi-paradigym language ... it can suit a variety of styles ... I agree with dex that ASM is fun .... it is good for individual and small sized projects and its fun playing with assembly ... with little care you can write readable programs in ASM ... but i do not recommend it for very large projects ...because of many subtle reasons .. 1) we do not want people to reinvent the wheel all the time ... 2) lot of repetitions when translating simple logic 3) flexiblity suffers ... 4) Most of the time we are intrested in getting things done rather than "how it is done " .... It is this micromanagement that makes assembly language difficult for large projects .. .. Again i would like to restate that it is the art of programmer to write readable code eg ..you can get the begin end effect by using the preprocessor like this

Code: Select all

#define Begin {
#define End   }
You can get the effect of delgates in C++ .. by using a linked list whose data feild is a function pointer ..You can simulate polymorpism in C using
a unoin inside a structure and by using a variable for indicating the type .... Although i am not a pascal expert .. it seems to be very easy to write inline assembly in C than any other language ...( gcc inline assembly syntax is somewhat confusing ..##) which makes it a great language for OSDEV and most of the successfull OS'es are infact coded in C or C++ ......C have stood the test of time and have proved to be a versatile language ...
thegreatseph
Posts: 12
Joined: Wed Dec 19, 2007 6:40 pm

Re: C/C++

Post by thegreatseph »

SandeepMathew wrote:Hi ,
Although i am not a pascal expert .. it seems to be very easy to write inline assembly in C than any other language ...
Well, Inline asm is much more of an implementation issue than a language one. In Turbo Pascal 7 (what I use) it is:

Code: Select all

Program enddos;
begin
   asm
   mov ax, $4c
   int $21
   end;
end.
It is rather simple however, TP7 shows it's age in the fact that the inline asm doesn't support newer instructions. Delphi does, but is designed with Rapid Application Development in mind not systems programming.
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Re: C/C++

Post by Laksen »

thegreatseph wrote: It is rather simple however, TP7 shows it's age in the fact that the inline asm doesn't support newer instructions. Delphi does, but is designed with Rapid Application Development in mind not systems programming.
Just use Freepascal instead. It's syntax compatible with delphi, tp7 and standard pascal.
Bernhard
Posts: 7
Joined: Thu Apr 26, 2007 5:42 am
Location: Munich, Germany

Oberon Operating System

Post by Bernhard »

thegreatseph wrote: ...
I think that Modula-2 or Oberon seem quite good too, especially for OS design, I really like well, how modular Modula-2 is. I used to do a bit of programming in it, however settled on pascal due to complete lack of tools available for Modula-2 (yes compilers are on all major platforms, however with not much source code available, and few up to date run time libraries).

...
there is a complete OS written in Oberon, although there are people who do not really like the design (after having glanced for some minutes through several hundred pages of design and source) ... see http://www.osdev.org/phpBB2/viewtopic.php?t=14951
Bernhard
Posts: 7
Joined: Thu Apr 26, 2007 5:42 am
Location: Munich, Germany

Re: C/C++

Post by Bernhard »

SandeepMathew wrote:

Code: Select all

#define Begin {
#define End   }
...
defines do not add any saftey to a language, they provide only a tiny bit of readability.
Post Reply