I
Ian Collins
Tony said:You can get most of the functionality of C++ templates via the C
preprocessor.
s/most/a small subset/
Tony said:You can get most of the functionality of C++ templates via the C
preprocessor.
Kaz Kylheku said:
The design flaws in ggets, or some of them at least, have been
pointed out to the author many times. He seems to regard them as
advantages.
Who guarantees that someone won't run a debugger on your program and
change the value of a variable, so that *any* code becomes unsafe?
Mark McIntyre said:To be a spammer, you have to be posting unsolicited commercial material.
Bollocks.
I suspect you meant troll,
CBFalconer said:I don't know if this is you or a nymshifter,
but it is pure trolling.
For the benefit of all, ggets is written
[/QUOTE]Who guarantees that someone won't run a debugger on your program and
change the value of a variable, so that *any* code becomes unsafe?
Did you read the _whole_ of that post? Including the footnote?
[/QUOTE]Aha, but you've missed another edge case yourself, and rather an
important one. Who guarantees - _without_ using OS control
functions outside the purview of the Standard - that the file
you've written isn't changed behind your back? You're guaranteed*
that objects inside your program don't change unless you change
them yourself, or they're volatile. You are given no such
guarantee about files.
Most systems will guarantee that access if you open the file for
read/write, and don't close it.
But you get the facts wrong:
(1) gets() is not used a lot.
(2) If it gets (no pun intended) used, it would be anyway better to
rewrite that code...
jacob said:Keith said:Keith Thompson wrote:
[...]
jacob's use of the word "lie" is, as usual, inexcusably rude, but
apart from that he has a valid point.
Well, but then you do not ask WHY Mr McIntyre is doing this?
No. I'm more interested in why youObviously if somebody says that MSVC supports C99
that is not a lie.
Just to be clear, I did not say that. I said, in a post sent at 00:00 on
10/03/09
"gcc is close to claiming C99 conformance. MSVC isn't likely to, but
does support much of C99."
So please, before you make up false statements and attribute them to
others, please remember that posts can be persisted.
So. Mr McIntyre saysMSVC supports C99
Again, I did not say that.
and I said that it is a lie.
Even if I had said that, and as I've already noted I did not, it would
/still/ be offensive.
And YOU say that I am "offensive" because
I tell the truth,
You are offensive because you insult people without cause, tell untruths
and then claim that the other person has done it.
I answer that it is not true and that the person telling that is
telling lies.
The first part is not offensive. The second part is not only offensive,
it is completely unnecessary. If you have a correction to make, make it
without insulting people.
This can't even be put down to language differences. I worked for a
French bank for 10 years, some of that time in Paris, and in all my time
there I never heard anyone call another a liar. Its as offensive to
French as it is to English.
The evidence is the text of McIntyre"MSVC supports C99"
Again, I didn't say that.
On Mar 11, 6:19 pm, Mark McIntyre <[email protected]>
wrote: [...]
You guys are beating a dead horse and only making an already hard-to-
read thread that much harder to get through. It's unfortunate.
You can get most of the functionality of C++ templates via the C
preprocessor.
Ian Collins said:s/most/a small subset/
Tony said:Simple and elegant are key, IMO. "Moving generics into the compiler for
unending exploitation" is bad, IMO (but I'm not trying to sell compilers).
jacob navia said:Why C?
jacob navia said:Why C?
With the development of the c++ language, c was destroyed.
Destroyed in the sense that all language development ceased,
and "naturally" all developpers changed horses to the "new and improved"
c++,
leaving c as a bad souvenir or at best a curiosity to be used in embedded
systems or similar environments where c++ doesn't cut it.
Many c++ books (specially some older ones) start with a chapter telling
people how bad C is, and why c++ solves all the problems of c. Of course
this is not very difficult to do since c remained as it was in 1989,
without any change.
Still, I think that c can be a very good language precisely because of its
simplicity.
It is the only high level language where there isn't any "object oriented"
framework that has been implemented in most current languages, from java
to cobol.
What are the main issues with C?
(1) The obsolete c library.
===========================
The c library is part of the language
and it was one of the first standardized, portable implementation of a
language across a number of computers.
Its main problems are:
1.1: No support for standard containers like lists or hash tables
1.2: A completely obsolete representation of strings.
1.3 Wrongly specified and buggy library functions.
2: Language issues
==================
(2.1) It is impossible to create new numeric types
(2.2) It is impossible to create another type of strings
------------------------------------------------------
Many libraries exist that implement counted strings, but they all
require the user to forget the natural notation str[5] = 'a' and adopt
a cumbersome notation in the style of:
asgnstr(str,5,'a');
3: The proposed solutions
=========================
3.1 The solutions to the language problems.
In the lcc-win compiler I have developed a solution to the language
problems, that simplifies the language and at the same time opens it up
to the user.
Operator overloading is an accepted technique in many languages,
from the venerable FORTRAN to C#. lcc-win proposes this solution to:
o Develop new kinds of numbers.
3.2 The solutions to the library problems.
------------------------------------------
Microsoft has proposed a set of more secure functions that should
replace the unsecure ones. The particular definitions of those library
functions aren't so much interesting in this context. What *IS*
relevant is that the error analysis is an integral part of the
specifications.
All arguments allowed value ranges are described,
and
the possible errors enumerated. The language should take this way of
specifying the functions inthe library as a guideline to be used in the
specifications of ALL functions in the library.
The new C standard
should specify an interface for containers like lists
or hash tables.
Again, I have developed basic examples in the lcc-win
compiler.
Conclusion
==========
The proposed changes do not alter fundamentally the nature of C.
They are very small and maintain the essential simplicity of the
language.
True, C is simple.
False.
But, as Einstein said, things should be as simple as possible but not
simpler.
Ian Collins said:Macro solutions may be simple, but they can be far from elegant and a
nightmare to debug and maintain.
jacob navia said:There are absolutely no new language features in C99.
[email protected] said:On Mar 11, 6:19 pm, Mark McIntyre <[email protected]>
wrote: [...]
You guys are beating a dead horse and only making an already hard-to-
read thread that much harder to get through. It's unfortunate.
And the point of posting this followup 6 days later is ...?
--
Keith Thompson (The_Other_Keith) (e-mail address removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[....][email protected] said:On Mar 11, 6:19 pm, Mark McIntyre <[email protected]>
wrote: [...]
You guys are beating a dead horse and only making an already hard-to-
read thread that much harder to get through. It's unfortunate.
And the point of posting this followup 6 days later is ...?
I don't get to read everything written every day and respond
instantly. At this point in the thread (and beyond) I felt no one had
realized Mark essentially said the same thing as "lie" to Jacob and I
wanted to point it out.
Do I need to be timely to make a point?
It's still a jumping off point. That's a lie, in that I don't believe it is
that. The concepts are a good jumping off point. The implementation sucks..
For us "oldtimers"? Aren't the "new languages" the kids' "rock and roll"?
what?
Cobol does OO now? (Just a blast from the past... I think they used to kid
me about structures because they said they came from Cobol... they called
them "records". I remember that day well. 1995. (There's a hidden story that
I'm not telling here.))
That's the wrong question, of course, IMO. "What can be learned or salvaged
from C?", seems more appropriate.
I've NEVER liked it!!! Good riddens! Bury it or drive a wooden stake into
it.
Not really though,
I am using C++ and replacing the std library with my own
library. Similar applies to C std lib.
Nope. It's the UNIX API.
That is all it is. I abstract it less than Win32
API because [it] is far less relevant to me. Nonetheless (is that one word?), the
ISO lib is just another platform (UNIX), IMO.
Its main problems are:1.1: No support for standard containers like lists or hash tables
I don't see that as a problem at all.
don't think the comittee should be
in the library business. [he]language definition probably suffers because
of that.
Did you mean that "typedef" is brain-damaged? If so, I agree. (See Ada 2005
for a solution).
I don't think that is hardly the issue at all. It may be secondary, or
tertiary or... I don't know. But I know it is hardly primary.
Sounds like a NON-solution from the get-go.
D is the opposite track, but
still fails. Go figure. Hmm. "Have C compiler, can travel" mantra? (What's
wrong with this picture?").
Which one of these is not like the other...
sorry, I digress.
Hmm. Kinda suspect. Why? Because you are focusing on "throwing errors over
the wall" rather than good design.
Ada2005 has "constraints".
No one has agreed upon error handling machinery though. Are you suggesting
just by specifying a general approach that the problem is solved? (I'm using
modern-traditional techniques over C++ exceptions and I am developing in C++
(granted, not in a production context right now)).
Ahhhh! So if you thought "a new C standard" is relevant, why didn't you just
say so! (I think "C is mortally wounded").
As you have noted: a NON-solution.
?
"Life support"? Unplug the respirator already!
why?
Appeal to long-and-hard-thinker, non-sequitur.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.