Re: A question about certain language features

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

Hello Ed,

----------
> ïÔ: Ed Davis <ed_davis2 at yahoo.com>
> ëÏÍÕ: EUforum <EUforum at topica.com>
> ôÅÍÁ: A question about certain language features
> äÁÔÁ: Monday, February 11, 2002 19:39

<snipped>

> The features I have questions about as to why there were
> implemented that way are:
> 
> 1) Variables can not be initialized when declared, but
> rather, must be initialized via an assignment statement.
> Based on other languages, this seems like one of those
> convenience type issues.  Is there some programming
> philosophy that says that an initialization in a declaration
> is a 'bad thing'?  What is the 'bad thing'?  I also note
> that standard Pascal does not allow variables to be
> initialized when they are declared.

There is good article by Travis Beaty about this point.
Visit please:
http://www.RapidEuphoria.com/hotnew.htm
There is the link to that article in this html.

> 2) No support of call by reference.  I understand that call
> by reference can lead to unexpected side-effects, but since
> changing global variables in a subroutine seems to
> essentially cause the same problem, I don't understand this
> omission.

No any side-effects here with the *globals*. If you'll 
reference to gobal name from inside subroutine, then you 
change just that variable. Private variable name override
global and local names inside subroutine and exists
only inside subroutine.

> 3) No support for local constants.

There *is* full support for local constants in Euphoria.
Terms are: global - for a different files scope, 
local -- just for single file scope, private -- just for
current subroutine scope. 
*Private* constants are not supported, becouse of *all* 
private variables exist just inside soubroutine.
Local constants are very useful for cross-routine use
inside the library file. Say, you have global functions in
the include file. You can set *local* constants just for
those global functions just inside single lib.

See and try Local <--> Private <--> Global,
thing looks just like to the real life.

No any & all confusions.

I think, many confusions are from those old good
*static*-*shared*-*extern*-*void*,
*by reference*-*by value*, *create*-*object*-*class*,
I call such the things just mumbo/jumbo.

Euphoria is normal human language for translation
to puter's mumbo\jumbo without weird side-effects.

Not from mumbo/jumbo to mumbo\jumbo.

And there is the human Mumbo-Jumbo language.
Almost all Russians know about this language
and understand it well.  smile

No any confusion, OK ?  ;-[

Regards,
Igor Kachan
kinz at peterlink.ru

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

Search



Quick Links

User menu

Not signed in.

Misc Menu