Re: C++ has Boost libraries, C?



jacob navia wrote:
Mark McIntyre a écrit :

For reference, what you've done here is create an object. A simple
one, but still an object.

Of course. But there are no classes, no inheritance, no complications.
This is an object in the C sense: transparent, without any added
constructors, destructors, whatever.

I think C must remain at this level. By introducing operator overloading
(something Fortran 90 supports also for instance) the language remains
simple as it is now, albeit with more expressivity (I hope this is
the right word )

Interesting, so you advocate extending the language with something that
boils down to syntactic sugar while dismissing the one feature
(constructors and destructors) that enables C++ to what C can't (RAII).

--
Ian Collins.
.



Relevant Pages

  • Re: Portability
    ... In this sense I mean that constructors and destructors are the ... wrong solution because they overly complexify the language ... programming idioms that are impossible to code in C. ...
    (comp.lang.c)
  • Re: weeding out c++ keywords from sys/sys
    ... code for constructors and destructors. ... The compiler keeps track where exactly the life ranges of objects begin ... On the other, other hand, Eiffel is a language with all ...
    (freebsd-current)
  • Re: C++ has Boost libraries, C?
    ... constructors, destructors, whatever. ... that frees you from all the destructor/freeing memory ... language FORCES you down your throat if you want it or not! ...
    (comp.lang.c)
  • Re: type checking
    ... >it's not far from your favourite SWIG-supported language. ... when its constructor raised an exception. ... It hasn't really been an issue so far, but I guess C# constructors ... This is one issue I already have with Java/C# style garbage collection ...
    (comp.lang.python)
  • Re: Destructor: not gauranteed to be called?
    ... > implementation detail for destructors in C++. ... Destruction is a language ... Resource automatic freeing (mainly memory), ... The problem is that most developper know about finalizers (which ...
    (microsoft.public.dotnet.languages.vc)