Re: Questions

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Mon, 10 Mar 2003 23:07:56 +0000, Gabriella Leveron 
<gleveron at hotmail.com> wrote:

>
> Does Euphoria support inheritance? In this case, does it support single 
> or multiple inheritance?

Object Oriented syntax and semantics are NOT built into the Euphoria 
language. Just as they are not built into Assembler or C, but you can 
create systems (libraries) that implement OO constructs. In fact, there are 
a few 3rd party libraries for Euphoria that implement OO to varying 
degrees.

So to answer your question...No, inheritance is NOT in-built in Euphoria. 
You have to use a 3rd party library or implement it yourself.

There is much initial confusion with Euphoria and OO because of Euphoria's 
term 'object'. This is NOT an OO object. By 'object', Euphoria is just 
reference to a generic data type, one that can hold a value of any 
datatype.

Thus it is valid to do this...

 object x  -- declare variable 'x' of type 'object'
 x = 1  -- Integer
 x = 23.456 -- Floating point (atom)
 x = "abc" -- String (sequence of chars)
 x = {17,8, 34,"abc"} -- sequence


> Does Euphoria support Templates (generic/parameterized classes)?

Not built-in. There is very little need for it either as it can be a 
weakly-typed language too. You can enquire about the data type at run time 
and make you processing dependant on that.

> Is Euphoria's typing static, strong, dynamic?

Technically it is static and strong. However, the 'object' datatype allows 
one to implement dynamic and weak typing. So in short, its both.

> Does Euphoria support polymorphism? If so, is it dynamic?

Only if you implement it yourself.

> Does Euphoria support overloading?

A little bit. Operator overloading is definitely not possible. By using the 
'object' or 'sequence' datatypes, function signatures can allow a tiny bit 
of overloading, but its nowhere near as expressive as C++, Java, etc...

> Does Euphoria support DBC (design by contract)?

Not built in. The 'type' system does a little of it, but you'd have to 
really implement it yourself. There is no assert() bult-in. The contract 
system in Eiffel and D are far better.

> Does Euphoria use compiler or interpreter?

Both, sort of. It is normally an interpreter, but there is a utility to 
convert the source to 'C' code and then have it compiled.

> Does Euphoria support multithreading?

No.
> Is Euphoria object-oriented?

Not built-in.

> Is persistence possible with Euphoria?

Not built-in. You can implement it yourself though.

> How does Euphoria handle garbage?

Very well. Its garbage collector is quite efficient.

> Closures?

Sort of. The 'routine_id' function allows you to pass references to 
functions/procedures, but you can't create routines at run-time.

> What do you think Euhporia's unique feature is?

The 'sequence' datatype. This is so essential to Euphoria that without it, 
Euphoria would be just another 'C'/Basic derivitive.

> Thanks in advance! I will be happy to receive any comments, as long as 
> their not mean.

Euphoria is not much effort to learn and because it is somewhat simple, you 
can do extremely powerful operations with it, so long as you don't mind 
coding a lot of low-level functionality.

-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu