Re: Pass by address

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

On C syntax:
Looks to me like line #4 generates a syntax error, but
your point is well taken i can assure you.  I could also
pose an interesting dilemma in Euphoria that raises some
questions also, but ill save that for another time.
Im sure there are exceptions in every language to some
extent if we look hard enough.

On passing by address:
Initially i should have just stated my original coding
problem: passing large and complex data structures in
the form of sequence to another exe program.  The most
impressive part of Euphoria in my opinion is the sequence.
Id love to see a Euphoria class for C++ come into being.
The interface is already there.
  At present though, the best part of the language cant be
passed to another program. You cant pass a variable name
to another program because the namespace isnt system wide
as with the Windows OS.
Thats why i got drawn into this thread because i thought,
gee, if you could pass the address to another program that
could use that address to lookup the sequence then that would
solve the problem elegantly. The second program could use
and or modify the data (without excessive peeks and pokes).
The same cant be achieved with a handle or id unless its
also system wide, possibly allocating with the WinAPI.
I would prefer the address eliminating the middle man.

On readabiliy:
Also, if routine_id() returned an address, wouldnt that
eliminate the need for call_back() and simplify the
"readabiliy" of the language?  If someone needed to enumerate
the returned "id's" they could certainly store the addresses
one by one in a sequence.
Also, as someone else had mentioned, if procedure forward
referencing was an option that would make readability much
simpler in my opinion.  You arnt going to tell me

  global atom FIRST_ROUTINE
  FIRST_ROUTINE=routine_id("FirstRoutine")
  retv=c_func(FIRST_ROUTINE,{arg1,arg2,arg3})

is more readable then

  retv=FirstRoutine(arg1,arg2,arg3)

are you now? smile

Then i started reading the threads on here and saw the ideas
about allowing left sided multi-variable assignments in the
language syntax--something even a language like C cant
boast.  Gotta love it!  Would of course raise the syntax
complexity of the language possibly pushing it through
another semi-instabiliy phase.  Gotta hate that!

Take care for now and good programming!

--Al Getz

ps. would like to hear more on passing by address

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

Search



Quick Links

User menu

Not signed in.

Misc Menu