Re: New Euphoria features
Dear Members
Pls keep Eu simple so it stays fast, cheap, and easy to learn.
David
On 23 Feb 2005 at 13:45, CChris wrote:
>
>
> posted by: CChris <christian.cuvier at agriculture.gouv.fr>
>
> D. Newhall wrote:
> >
> > ZNorQ wrote:
> > >
> > > IF I'm so lucky, I would wish for the following features;
> > >
> > > #1;
> > > Select Case
> > > Case .. or ..
> > > Case Else
> > > end Select
> > >
> > > I hate having to use IF / ELSIF in this case.
> > Yeah, lack of select and case statements are really annoying but
its
> > one less keyword that people need to learn about.
> >
>
> Why? It will be there when you need it, but are you learning all
the
> keywords and constructs of a language at once ??? I wouldn't
recommend
> that anyway.
>
> > > #2;
> > > 100% object oriented? :D
> > Hey, Euphoria is a clean and simple language we don't need any
> > objects messing it up! :p
> >
>
> Hey, Euphoria lacks modularity because it lacks objects (in the OOP
> sense) and correct namespace system. When you look at the kind of
> obfuscated code you need to get them, I wonder how can this
language
> claim to be "clean".
>
> > (Although, in all honesty I'd rather Rob add gotos then add
support
> > for OOP.)
> >
> >
> > If I could add anything to Euphoria it'd be pointers. It's
annoying
> > when you use long desriptive variable names to have to type for
> > example (in a program I'm working on now)
> >
> > if equal( running_tasks[priority][task_id][TASK_NAME],
> > task_to_kill ) then
> > running_tasks[priority][task_id][TASK_NAME] =
> > kill_task( running_tasks[priority][task_id][TASK_NAME] )
> > elsif equal( sleeping_tasks[priority][task_id][TASK_NAME],
> > task_to_kill ) then
> > sleeping_tasks[priority][task_id][TASK_NAME] =
> > kill_task( sleeping_tasks[priority][task_id][TASK_NAME] )
> > else
> > printf(2, "Error: No task named %s found.\n", {task_to_kill}
)
> > end if
> >
> > when using pointers I could just type something along the lines
of
> >
> > current_task =
> > pointer_to(running_tasks[priority][task_id][TASK_NAME]) if
> > equal(current_task, task_to_kill) then
> > current_task = kill_task(current_task)
> > else
> > current_task =
> > pointer_to(sleeping_tasks[priority][task_id][TASK_NAME]) if
> > equal(current_task, task_to_kill) then
> > current_task = kill_task(current_task)
> > else
> > printf(2, "Error: No task named %s found.\n",
{task_to_kill})
> > end if
> > end if
> >
> > The second method is a lot easier to type out and is still just
as
> > readable.
> >
>
> Pointers are supposed to be unsafe, hard to debug etc. I don't
fully
> agree with that view. However, some solution to the problem you
state
> is needed. Creating aliases for things, like in:
>
> ref current_task running_tasks[priority][task_id][TASK_NAME]
> --do some stuff, using "current_task" as a macro
> deref current_task
>
> may enable one to have it both ways.
>
> CChris
>
>
>
>
|
Not Categorized, Please Help
|
|