OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 10:29 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re:Programming language features
PostPosted: Wed Nov 06, 2002 6:49 pm 
Christoph, i'm quite at a loss as to why you would need anything that any particular language doesn't provide. C++ seems to have all it needs for coding major applications, rebol has all it needs for network-oriented scripting applications, ruby has all it needs to be functionally equivalent to nearly all other scripting languages....

if you need to use one obscure and (extremely) rarely-used feature of some extremely obscure language, why do you need to create (or modify) a language that includes those features? after all, such features are so uncommon as it is.


Top
  
 
 Post subject: Re:Programming language features
PostPosted: Wed Nov 06, 2002 7:11 pm 
Hi,

grey wolf wrote:
Christoph, i'm quite at a loss as to why you would need anything that any particular language doesn't provide. C++ seems to have all it needs for coding major applications, rebol has all it needs for network-oriented scripting applications, ruby has all it needs to be functionally equivalent to nearly all other scripting languages....


Well, C++ doesn't really have a decent type system, so its usefulness for large-scale applications is somewhat debatable (the fact that large programs have been created in C++ should be contrasted with the general quality of today's software, which, compared to the products of any other discipline considered to be an engineering one, is still, at the very least, embarassing).

As far as Rebol and other special-purpose programming languages are concerned, my general perception has been that these languages in general just provide convenient syntactic sugar for things that other languages would put into libraries (possibly hiding them behind some unwieldly generic syntax).

grey wolf wrote:
if you need to use one obscure and (extremely) rarely-used feature of some extremely obscure language, why do you need to create (or modify) a language that includes those features? after all, such features are so uncommon as it is.


That doesn't mean it's not useful now or in the future. Imagine suggesting networked objects to someone twenty years ago-- you would've been laughed at.

Don't get me wrong-- I don't want to change or come up with new languages at this point, I just want to examine a couple of language features from a mathematical point of view in my thesis, and try to see how they can (semantically) interact. That's why I'm looking for fresh ideas here-- networked objects, serialization, exceptions, continuations, side effects and slicing all give a lot of motivation for this kind of work, but there may be lots of useful things I'm missing.


-- Christoph


Top
  
 
 Post subject: Re:Programming language features
PostPosted: Thu Nov 07, 2002 8:41 pm 
well, C/C++ wasn't exactly designed with RTTI in mind. it was just meant to give you hardware. :)

good luck on your thesis. i wish i could give helpful input.


Top
  
 
 Post subject: Re:Programming language features
PostPosted: Sun Nov 10, 2002 8:30 pm 
hmmm this is not about the thread exactly but I found somthing funny about C/C++

when you define:

#define PRN printf("Hello\n"); // see that ';'?

you can type in:

PRN // No Semi-Colen!!! with no errors!

but I think that'd be the source of bugs and mis-types and bad habits. I think that C/C++ should have a protection about that so errors are less.

Is that off-thread or i'm never going to understand what you mean and I shouldn't even post in this thread? ::) ??? :-[ :o


Top
  
 
 Post subject: Re:Programming language features
PostPosted: Mon Nov 11, 2002 5:03 am 
Tom wrote:
hmmm this is not about the thread exactly but I found somthing funny about C/C++

when you define:

#define PRN printf("Hello\n"); // see that ';'?

you can type in:

PRN // No Semi-Colen!!! with no errors!

but I think that'd be the source of bugs and mis-types and bad habits. I think that C/C++ should have a protection about that so errors are less.

Is that off-thread or i'm never going to understand what you mean and I shouldn't even post in this thread? ::) ??? :-[ :o


Well, one thing you have to keep in mind is that, while it is defined alogn with C in the ANSI standard, the preprocessor is {i}not{/i] a part of the language proper. The preprocessor is just what the name implies: a tool which processes parts of the source code, making changes to it, before the text is sent to the compiler. Except for the #pragma statements (which change the option switches sent to the C compiler) , every preprocessor directive has the effect of adding, replacing or removing text in the C source code.

In the case of [tt]#define[/tt] statements, what they do is replace the defined label with the exact text that follows (except comments, which the preprocessor removes first) until the end of the line - since they are not C statements themselves, [tt]#define[/tt]s are not closed by semi-colons. (In the case of macros, the parameter labels which appear in the defined string are first replaced with their actual arguments before te label is changed). So, when after the preprocessor is done, what the C compiler sees is
Code:
printf("Hello, World!");

without any indication of the #define or any other preprocessor tools.


Top
  
 
 Post subject: Re:Programming language features
PostPosted: Fri Nov 15, 2002 8:22 am 
has anyone ever heard of c--? ive only seen one mention of it somewhere, and i forget the source. its supposd to be lower level than c, but higher than asm. but id like a compiler that lets you write in c or c++, but you can inculde a block
asm{
//code here
}
and it would compile that asm code. i think gcc can do this, but i HATE AT&T assembly syntax. i think its so ugly. nasm syntax is nice and clean, and id like a compiler that lets you do wat i said above using nasm sytanx


Top
  
 
 Post subject: Re:Programming language features
PostPosted: Fri Nov 15, 2002 12:58 pm 
Hi,

elias wrote:
has anyone ever heard of c--? ive only seen one mention of it somewhere, and i forget the source. its supposd to be lower level than c, but higher than asm.


Found the link on Simon Peyton-Jones HP: http://www.cminusminus.org/.

-- Christoph


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], Octocontrabass and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group