Re: Standards

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

I have a few recommendations...
--------
Don't put *all* math routines / constants into math.e - remember we're
dealing with an interpreted language.  Unless it absolutely makes sense not
to do so, we should try to keep the basic include files as small as
possible.  Advanced, infrequently used functions, should be available in
the standard library - but kept in separate include files with a standard
naming convention.  For example:

        math.e
        math_trig.e
        math_stats.e
        math_complex.e
--------
Shouldn't at least some of the following functions return objects instead
of atoms?

        object abs (object)
        object sign (object)
        object max (sequence)
        object min (sequence)

Euphoria's math paradigm is very symmetrical where atom / sequences are
concerned.  If you add sequences, Euphoria simply iterates through
sequences and even recurses if necessary to accomplish a full vector add.
 The abs () and sign () functions clearly fall into this category.

If min () and max () returned objects, they could be used to find the
(alphabetically) first string in a sequence of strings.  The question is
which would be more useful: 1) return the first string; or 2) return the
smallest atom in the whole sequence of sequences (of sequences, etc.).  I
don't have a strong opinion either way on this one.
--------
The sign () function should (for the simple case of an atom) return -1, 0,
or 1 instead of -1 or 1 as was mentioned in an earlier posting.
--------
I don't want to offend anyone, but the ".ex" extension for DOS programs
never made much sense to me.  It isn't in line with the symmetry of the
rest of the language.  The following makes more sense to me:

        .e      Generic, platform-neutral include
        .ex     Generic, platform-neutral executable

        .ew     Windows include
        .exw    Windows executable

        .ed     DOS include
        .exd    DOS executable

        .el     Linux include
        .exl    Linux executable
--------
I appreciate your volunteering to be the "keeper of the standard libraries"
Matthew.  It shows insight and initiative.  Euphoria is now several years
old, it's on the verge of being available on 3 platforms, and a
cross-platform GUI is under development.  I believe it would help grow the
popularity of the language if we made a full-featured standard library
available.  The big question now is who decides what makes it into the
official Standard Euphoria Library.  Do we want to elect a "standards body"
or do we keep the chaotic informality?

-----Original Message-----
From:   Mathew Hounsell [SMTP:mfh03 at UOW.EDU.AU]
Sent:   Friday, June 25, 1999 5:26 PM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Standards

I intend to track the standards if no one objects.
I will track things like syntax and how many people support it. I will also
keep a copy of the
documentation. I will write a euphoria program to make generating a
submission simple.
I will need to publish the standards on a web site and it would probablely
easier to use a free
one as I doubt RDS wants to give out access to there site and probabely
don't want to receive
heaps of mail from me. Any suggestions as to which free one ...

I will track code and values upon decision of prototypes etc.

I will write up te rules as soon as possible. Of course the main ones will
be :
* All decisions will be made only by the euphoria community based on a
democratic vote.
* I will impartial.

------------------------------------------------------------------------
-----------------------
A submission should be submitted as

In the Subject of the message ...
 EUSTD Submission <category>
In the body of the message ...
 Name :         Name of routine/constant/etc
 Type :         New/Change to a standard
 Reason :       I want a good reason.
 Comments :     If you want to say anything important
 Syntax :       Function Prototype
 Documentation :        On the lines underneath

The Categories are :
Mathematics, Sequence Manipulation, Object Oriented Programming,
Algorithms, Input/Output,
Networking, User Interface, Database, Graphics 2D/3D, Threads, Machine
Level,
Operating System, Miscellaneous, Documentation, Standards

Vote Submision
------------------------------------------------------------------------
-----------------------
In the Subject of the message ...
 VOTE Submission <category>
In the body of the message ...
 Name :         Name of routine/constant/etc
 Type :         Support / Against
 [Reason :      Out of interest]

------------------------------------------------------------------------
-----------------------
If you suggest a routine you will have to provide the documentation in
standard RDS form, the
current standard.

The documentation whould be
[Platform:      DOS32/Win32/Linux]
Syntax:         [include <filename>]
                                function prototype / constant name / type
prototype
Description:    What it is / does
Comments:       Things you wnat to know
Example:
[See Also:]

A function protoype is written as...
<return type> <name>( [<type> <name>] [, <type> <name>] [, <type> <name>]
etc )

A type protoype is written as...
type <name>( <type> <name> )

Types are  atom, integer, object, sequence
        string - ie a sequence of charcaters
        I know strings aren't supported however it is simpler to say
string.

[] indicate it is optional.
<> idicates it should be replaced by the approriate value.

eg
PI
------------------------------------------------------------
Syntax:         include misc.e
                PI
Description:    PI (3.14159...) has been defined as a global constant.
Comments:       Enough digits have been used to attain the maximum accuracy
possible for a Euphoria
atom.
Example:        x = PI  -- x is 3.14159... See Also:    sin, cos, tan


------------------------------------------------------------
So far in Math (Votes are between [])

PI = 3.141592...                                [Approved!]
atom abs( atom )                                [6]
object = arcsin( object )       [Approved!]
object = arccos( object )       [Approved!]
atom min( sequence )            [4]
atom mean( sequence )           [2]
atom median( sequence ) [2]
atom min( atom, atom )          [4]
atom mode( sequence )           [2]
atom sign( atom )                       [3]
atom sum( sequence )            [2]
-------------------------
Sincerely,
Mathew Hounsell

mat.hounsell at excite.com
________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

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

Search



Quick Links

User menu

Not signed in.

Misc Menu