Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: My first post to Sai

From:Keith Gaughan <kmgaughan@...>
Date:Wednesday, January 5, 2005, 22:40
Sai Emrys wrote:

>> Succinctness is simply one goal of many. :) > > No contest whatsoever on that point. ;-) > >> Yet C and C++ are still common. Why is this?
>
> Some would argue that this is pure inertia. (FWIW, I have mainly used > C in my coding career, and learned Scheme recently.)
I wouldn't say it's inertia, if by that you mean a lack of willingness to use other, more expressive languages (O'Caml, for instance). It's more that so much low-level stuff is written in C, like the various *nixen and other OSs, and C allows you to get close to the metal--which is still useful in systems programming--so it's hard to get away from it. Same goes for COBOL, but for different reasons. C++ is popular because it's based on C. No other reason. BTW, learn O'Caml: it rocks. Chris Bates wrote: > Is COBOL succinct? Not really. Is it useful? Yes. Because it > presents programming the computer in a way non Computer Scientists > could understand. I'd disagree with that to some extent. It doesn't really do that, it just *appears* because it doesn't use a notation and uses words instead: ADD N TO X As opposed to: x += n; But saying using words as opposed to notation is akin to saying that Pascal's use of begin...end rather than something like C's {...} is easier to understand. I don't buy that. > Also, succinctness is not power. If succinctness were power, > then everyone would be programming in very high level languages like > C# which are often more succinct than C. Yet C and C++ are still > common. Why is this? Because C# is a new language, for a start. Also, C# serves a different purpose to C and C++, the former being an applications language and the latter being systems languages. C's dominance is primarily down to Unix and its clones. When you're building software for them, it's natural to talk to the API directly, so you use the language they were written in. As *nixen spread, so did C. > because C and C++ are more powerful and capable than C#. Power and capability are very vague. Depending on how you look at them, any of the C# can be described as the more powerful and visa versa. Again, you have to look at what they're for. If you need to get at the bare metal or need raw speed, then C and C++ are what you need. If expressiveness is more important (as it is when you're doing app development), then C# is better. But I don't understand how you can described either C or C++ as being more capable than C# (or Java for that matter). It's not that hard to write C in either C# or Java: the only thing you miss is being able to manipulate pointers (which isn't such a loss if you've references) and being able to hack the hardware directly with them. > What a language can is not completely determined by the succinctness > with which it can do it, and some things are almost impossible to do > in C# because it was designed for a different purpose. And vise versa. There are things that are trivial in application languages that are hard in system languages. > Addition: A better example might be perl vs C. I can write perl > programs that do things much more succinctly than in C. Why then isn't > perl more power? Yes, it's more powerful, but only within its domain, which is scripting and text processing primarily. Just like you're not going to write an OS in Perl, you're not going to do data processing in C unless you've no alternative. > And why do people still use C? Because it serves a different audience to Perl. > Of course its because my succinct perl programs are also a nightmare > to read, Which is a good reason to write code in Python, Ruby, Lua, or some other scripting language. Or O'Caml, but that's because it rocks. ;-) > and because there are some things difficult to do in perl which are > easier in C. So succinctness definately isn't all. Nope, it's down to problem domain. It's all problem domain. K. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005

Reply

Chris Bates <chris.maths_student@...>