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?
|
|
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
Where as anything that looks like (from wikipedia) Might be called lisp based
Some people have done a lot of work and created a comp language tree for reference. |
|||||||||||
|
|
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. |
|||||||||||||
|
|
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. |
|||
|
|
|
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
and note that c itself owes something similar to ALGOL here's a good visualization
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
|
||||
|
|
|
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:
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). |
||||
|
|
|
It is just something which is said of a language in two situations:
What is shared by all those "C based" language is so small that it has practically no importance. |
|||
|
|
|
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. |
||||
|
|
|
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 ( 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. |
|||
|
|
|
"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. |
|||
|
|