[#964] Bastion or SecurityManager for Ruby? — Clemens Hintze <clemens.hintze@...>

Hi,

15 messages 1999/12/10

[#989] a question about to_i — Friedrich Dominicus <Friedrich.Dominicus@...>

Sorry, I'm quite new to ruby. But I encounterd the following problem. If

17 messages 1999/12/19

[ruby-talk:00963] Re: Ruby compileable by C++ compiler?

From: Clemens Hintze <clemens.hintze@...>
Date: 1999-12-10 09:04:38 UTC
List: ruby-talk #963
Wei,

Yukihiro Matsumoto writes:
> Hi,
> 

[...]

> |That means, I have to compile ruby also with a C++ compiler. But many
> |functions in the sources of ruby are declared/defined in K&R
> |C-manner. That will not be accepted by our C++ compiler.
> 
> Hmmm.  I'm afraid that would happen.  sigh.
> 
> The reasons why I choose old style C are:
> 

allthough I can understand your feeling for point two, but you should
also try to see the advantages that C++ or even ANSI C would give you!
Both C++ *and* ANSI C are able to do a lot of typechecking that K&R C
couldn't do (at least without Lint). Although I also do not like the
way ANSI C or C++ denote function definitions, I like the benefit the
compilers give to me a lot (for C++ we also have typesafe linking, for
instance). And you too, use function prototyping in some sources of
Ruby, didn't you? ;-)

If it is really necessary to remain compatible with K&R C, we could
use #ifdef ... #endif around the function definitions to use both ways
ANSI-C/C++ *and* K&R C style. But of course that too, would'nt look to
pretty.

[...]

> 
> At present, I guess all compilers can understand ANSI style, so that
> the former is no longer important.  But...

But please bear in mind, that it may come a day, that we will not have
C compilers any longer. For our platform e.g. there is only a C++
compiler available. There *is* a old K&R C, but we would have to pay a
high price to get it, and it would be unsupported too.

Fortunately there is a GCC available ;-)))

But for my project, it is requested to use a C++ compiler. It would be
a pitty if I couldn't use Ruby here, only because it sticks to old
syntax, wouldn't it?

But we should also hear opinions of other member. So please share our
discussion :-)))

> 
> 							matz.

\cle

In This Thread