Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What is the definition of C-based language?
Is C# considered to be C-based?
Is Java considered to be C-based?

Furthermore, what does it mean for a language to be based on another language anyway?

share|improve this question

migrated from stackoverflow.com May 24 '11 at 16:33

This question came from our site for professional and enthusiast programmers.

    
yes both are considered C based language. Most of their language construct systax comes from C. –  shadowfoxmi May 24 '11 at 16:32
8  
The definition of a C-based language is a language based on C. Do you seriously need a more detailed answer? –  user16764 May 24 '11 at 16:35
    
@user16764: define what it means for one language to be "based on" another, then. The color blue isn't defined by "being blue" either, is it? –  jalf May 24 '11 at 16:38
1  
@Sonosar: Please provide a quote or a link so we can see the phrase that confuses you in context. It's hard to guess at the author's intent from "C-based language". What was the basis? Syntax? Procedural Semantics? Common history with BCPL? –  S.Lott May 24 '11 at 17:11
1  
Here is a list of C-based programming languages: en.wikipedia.org/wiki/List_of_C-based_programming_languages –  yasouser May 24 '11 at 17:22
show 1 more comment

9 Answers

up vote 16 down vote accepted

C biased in general means looks like C from a syntax view. It has nothing to do with how the language works or the features it provides.

Anything that looks like the flowing will be called c like

Type Declaration([Type] Param)
{
    Type Var (Statement Ender)
    Var[Selctor]SubItem 
}

Where as anything that looks like (from wikipedia) Might be called lisp based

(lambda (arg) (+ arg 1))

Some people have done a lot of work and created a comp language tree for reference.

share|improve this answer
    
That's a pretty good illustration. +1 :) –  jalf May 24 '11 at 16:58
    
Thanks for your excellent answer.What do you think is there a way that syntax is not the only definition?I know this sounds dump , but the answer to this question will be very useful to me.I want to make sure that I have complete understanding of this. –  Sonosar May 24 '11 at 17:53
1  
Take a look at this wikpedia article en.wikipedia.org/wiki/Comparison_of_programming_languages it may give you some insight. A programing language in general is just a set of logical concepts built to solve problems on theoretical machines. Thats why there are different compliers/interpretors that interpret the same code differently and create different end resluts. –  rerun May 24 '11 at 19:18
    
That language tree is going to be my favorite pdf document ever. –  Griwes Oct 8 '11 at 16:11
add comment

Your question may not have a definitive answer because programming languages are developed on a model and follow paradigms (such as functional, object-oriented, procedural,multi-paradigm etc...) which can be influenced by many other factors (significantly design and implementation) and thus cannot be be based solely on a single language without any change in any of these (if any tried it would not make much sense) but c based languages do exist here's how

C was and is an extremely successful language and many programmers were and still are familiar with it so it made sense that languages meant to be caught on as a general programming language follow its already familiar syntax for code such as blocks within braces and function declarations and so forth and many did for example see

http://en.wikipedia.org/wiki/List_of_C-based_programming_languages

and note that c itself owes something similar to ALGOL here's a good visualization

http://en.wikipedia.org/wiki/Generational_list_of_programming_languages

but as i said i do not consider this answer as definitive because a language can also be said to be based on another in many ways say by basing its major paradigms but following a different syntax so a c based language may be created without curly braces and semi colons but in many cases this reasoning holds

EDIT: from Wikipedia (the second link) a general one liner (again not definitive) for your second question would be

the ancestor language with the strongest influence may be considered as the base language.
share|improve this answer
    
+1 for relating C language to its strong influence –  cctan Mar 28 '12 at 3:57
add comment

There is no fixed definition. But yes, most people would consider both to have their roots in C.

As a rule of thumb, curly braces and the upside down function definitions that start with the return type (return-type name(parameters)) are pretty sure signs that a language has its (syntactic) roots in C.

Of course, semantically, there are many other languages that had a bigger influence on C# and Java than C did. But syntactically, it is pretty clear to see that both are based in C.

share|improve this answer
add comment

When I see (or say) "C-based language" or I think (or mean) "a language that follows C-syntax in nature and is generally imperative". Generally this means the language was designed to sell to C programmers. (E.g. Pike, C++ and Java -- "it's just C with objects" or "dynamic C" or whatever.)

Thus, to me, Java is a "C-based languages" -- that is, even though the underlying mechanics in Java are almost entirely different it still follows the basic C imperative syntax. However, besides some syntax similarities and imperative nature there is not many similarities between these languages, so it is important not to read too much into these sort of propositions.

Scala on the other-hand, would not fit this requirement for me as it is not "generally imperative" (at least when idiomatically used).

Of course, this is just my usage of the term ;-) Thus, because of the vagueness, when such statements/terms are used they should generally be qualified with the "X is C-based because..." to ensure a common meaning between parties.

share|improve this answer
add comment

"C-based" is a pretty nebulous term in general. In this case both of those languages could be considered "C-based" because they borrow a lot of syntax constructs from C (brace delimiters, semicolon line-endings, prefix type declarations, etc.), however they're vastly different languages in terms of approach/paradigm.

As a result, the classification of "C-based" is really a very useful one in general except from a historical perspective.

share|improve this answer
add comment

A language is based on another language if it was designed modifying that language. "Designed by modifying", of course, is what "based on" means. In the case of Java and C#, you can see that both were designed by modifying C: they have C's operators, C's operator precedence, most of C's keywords, C's brace syntax, C's short-circuiting boolean operators, C's case sensitivity, C's behavior for the division operator, C's fall-through for the switch statements, etc.

Furthermore, the official word is that Java is strongly influenced by Objective C. Objective C, as everyone knows, is based on C. C# is based on Java. That would make them both at least strongly influenced by C.

Finally, this is the third sentence of the Java language specification:

The Java programming language is related to C and C++ but is organized rather differently, with a number of aspects of C and C++ omitted and a few ideas from other languages included.

Sounds like as clear a statement as you can get that Java is based at least partly on C (with some aspects omitted and some other aspects included).

share|improve this answer
add comment

Weird (e.g. new) syntax is more difficult for many people to deal with than familiar looking syntax. So many languages are designed to look like C syntax to make new users feel comfortable. In this context, if a language (which might be completely different underneath) looks enough like C to keep student C programmers from running away screaming about too many parenthesis, brackets, new keywords, APL punctuation, etc., then it can be said to be C based. Various language designers have claimed to hide Lisp, Scheme, Forth, Simula, Smalltalk, etc. "like" implementations inside a C-like syntax to help them gain more language popularity or accessibility.

share|improve this answer
add comment

I think C is actually considered a descendant of Algol. Algol and C are strictly procedural, and Java and C# are object oriented, so they actually derived from Simula, despite the many syntactic resemblances to C.

share|improve this answer
3  
But Java, C and Algo are imperative even if Java tries to hide behind an OO ("it's-not-procedural") facade ;-) –  pst May 24 '11 at 16:42
    
Err... no. C code compiles with a C++ compiler for a reason -- which is that it was built as an extension of C. –  Denis May 24 '11 at 16:46
    
@Denis, I don't understand your point C++ wasn't even mentioned. –  Charles E. Grant May 24 '11 at 16:50
    
Java and C# don't follow the Smalltalk object model, though. They follow the Simula object model, which is very different. –  Mason Wheeler May 24 '11 at 16:51
    
Won't C# compile a standard C or C++ library if you ask it too? (Being a Mac user I'm not 100% sure.) At any rate, where I really wanted to object was on the smalltalk part. The "C" language that derives from it is Objective-C. –  Denis May 24 '11 at 16:54
show 3 more comments

It is just something which is said of a language in two situations:

  • you want to attribute some of its drawback to its C heritage (to put blame somewhere else or to hint that the language is irrecoverably bad)

  • you want to claim a familiar look to get new programmers by hinting that they already know most of it.

What is shared by all those "C based" language is so small that it has practically no importance.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.