RE: Wishlist

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

-------Phoenix-Boundary-07081998-

Irv Mullins wrote:

>>3-- Pass-by-reference:
>>	integer x
>>	foo (&x)	-- x may be changed

>Useful, but the wrong syntax, in my opinion.
>Perhaps better would be to use:
>procedure foo (integer  x)
>.... blah...
>=A0=A0=A0=A0x +=3D1
>then call it like this:  foo (varying x)

  It would suit me.

>However, this has been requested before, and Rob has not shown
>much interest it implementing it, which leads me to believe that
>something about the internal workings of Euphoria would make
>that operation either difficult, or wasteful of time or memory.

>>5-- Enhanced standard library(s), possibly built-in

>It would just be a matter of organizing them a bit, documenting
>and stamping  them all. Maybe Rob doesn't have time for all that.
>All volunteers take one step backward.

Very difficult to do in the democratic volunteer environment. Really
needs a dictator (Rob) smile

>>6-- slicing shorthands:

>Also frequently suggested.  Your version adds a possible
>syntax checking problem, in that seq[2..] could *easily* be a typo - you 
just
>forgot to finish the range.

In my mind, 'seq[2..]' could be a typo in the same sense that
'x +=3D 1' could easily be a typo (it was supposed to be 10!) smile

I think '..' is prettier than '~', but either is acceptable.
 
>And as Carl pointed out, there is a definite problem with the
>seq +=3D "a",  a notation that confuses me anyway. It looks
>like a math function, maybe you want to add the ascii value of
>"a" to each atom in the sequence=3F 'append' may be wordy,
>but at least its meaning is clear.

The wordiness I was trying to address was not the 'append', but
the redundant 'seq'. My way is a failure; Is there another way=3F


>>7-- File-local definitions should override globals

>Breaks too much code, ..

=3F=3F I don't understand. Isn't it true that file-local definitions
which match globals draw error messages now=3F

The specific case I'm thinking of is:
	include mylib.e	-- defines 'global type boolean ...'
	include file.e	-- ERROR -- boolean already defined

The standard Euphoria library file 'file.e' locally defines a
'type boolean ...' This forces the global version to be included after
file.e. This is a minor include file ordering problem in this case,
but could get much worse as libraries proliferate.

>>13- def
>>replaces function or procedure

>Don't like this. There are very good reasons for having functions and
>procedures as entirely separate beasts.  def is not definitive enough for
>me.

Ok. That wish came directly from my 'lazy-typist' department.


>>14- structures

>Apparently un-doable with Euphoria as it stands.
>As far as I have been able to determine, there's no way to retain
>the type of a member of a sequence.  So type checking items
>within a sequence wouldn't be possible.

If I cant have types, I still want names.

>>15- Block comments

>Example:
>pretext disclaimer =3D
>This program is copyright 2001 by Irv Mullins <ir- at ellijay.com>
>who bears no responsibility for its use. If your hair falls out, your
>cat gets pregnant, or your kids get poison ivy, it's not my fault.
>=A0=A0=A0So there!
>end pretext

good idea, but see new wish # 18 below


>>17-  Automatic 'Result'

>I'm not sure I understand the advantage this has over simply 
>putting 'return 3.14' as the final line in the function. Please elaborate.

This is another minor 'lazy-typist' wish. I was noticing the large number
of functions I write that start off:
	function foo ()
	integer Result
	Result =3D 0
	...
and thinking how nice it would be if the common 'Result' were built-in.
Pretty minor!

18-	Concatenated strings
	Euphoria should merge successive strings, including across
	lines.
	sequence s
	s =3D "this is" " a single string"
	s=3D "this is also"
	  " a single string!"

P.S. My 'GOO' translator implements a number of these wishes, including 
namespaces,
slicing shorthands, and initializers. (Beware: its dot-notation objects
 only work in the simplest cases.)

Regards
Karl Bochert

-------Phoenix-Boundary-07081998---

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

Search



Quick Links

User menu

Not signed in.

Misc Menu