Re: Namespaces

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

Ralf wrote:

> David, I too am a little impressed, or at
> least awake again. The py code could be a
> great testing phase for new features of Euphoria.

Yeah, that's one of the reasons I'm promoting it. It's primarily an
incarnation of my wish list for additions to Euphoria - most of the features
could be added right in. I won't guarantee that they are 100% compatible
with existing code, though.

> I like the associated list, but why aren't you
> using it for the namespace

Because I got blindsided with dealing with reloading modules, and was
convinced that a truly stupid hack was the only way to do it. I'm recoding
namespaces using a-lists now. They are broken in the latest release.

> I don't the namespace solution (hack ?!) of using
> the filename. Instead, do something like this, to
> avoid the whole global/local/naming issue:

Wait for the next release. If it's still broken, complain again. smile


> I don't like the auto creation of variables ...

I'll probably be adding a 'option explicit' for people who don't like auto
creation. For the moment, objects will remain 'typeless', though. The
declaration will probably look like:

   declare x = 10, y, z = 10


> I like for-in-do .. everybody does.

It's just a convenience notation, but it works well with sequences. I'm
thinking that the shorthand:

   for i in 10

is probably too much of a hack, though.


> - Where is the { left, middle, right }  = my_func () notation ?

An example, please?


> And how to procedures work now?

The same as functions, but you ignore the result. For example:

   x = sin(1) -- it's a function!
   sin(1) -- it's a procedure!

This would be another neat thing in Euphoria, so you could avoid:

   ignore = foo()

> Good luck and success ..

Thanks!

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu