RE: Eu's poor design(Irv)
- Posted by Deric Wechter <dericwechter at netscape.net> Aug 17, 2003
- 408 views
Thanks for clarifying about the design flaw. For me, I've found Euphoria has become my choice for making quick "hack" pr= ograms to accomplish something specific. I've been using it a bit over a y= ear now but just recently I've begun to get a lot more into it. There are definite obstacles when using it to implement a large, commercial= quality application. While not insurmountable as if you're resourceful you= can always find a work-around, they're an issue. Having to make sure your sequences are storing the type of data you want I'= ve found as well can be a headache. You do need to check everything a user= inputs carefully. I usually use an extra variable for that and make sure = it's right before I add it to the sequence it's intended for. Of course, n= ot only is that extra code but it doesn't address all of the possible probl= ems as Irv pointed out. Also, I'm not entirely sure it would be the ideal choice for a beginner unl= ess an experienced teacher is involved. I'm able to fall back on my experi= ence with other languages to figure things out when I need to. If I didn't= have that experience to fall back on I would definitely want more document= ation and reference material available than exists for Euphoria. Still, all in all I really love Euphoria and I hope it continues evolving a= nd becoming an even better product than it is currently. I also wanted to = take a minute to thank all of the people involved with Win32Lib and IDE dev= elopment. They're fantastic free contributions that have greatly enhanced = the usefuless of the language for Windows development. -Deric Wechter eugtk at yahoo.com wrote: > > >--- Al Getz <Xaxo at aol.com> wrote: >=20 >> eugtk at yahoo.com wrote: >> >=20 >> >=20 >> > 3. You totally missed the fact that Euphoria does >> > indeed have a major design flaw. =A0One which causes >> > problems both for beginners and for experienced Eu >> > programmers, and which may limit Euphoria's future >> > growth. =A0An analysis of this would make a good=20 >> > term paper.=20 >> >=20 >> > Irv >> >=20 >> >=20 >> Hi Irv, >>=20 >> What what might that be? > >Euphoria is a strongly-typed language which just can't > >seem to keep track of what those types are supposed to >be, or how to use them. > >In most "high level" languages, after you define a >variable=20 >as a certain type, you can just "print" that variable >without concern about the type. Not with Eu. You,=20 >the programmer, have to choose the correct print >function from a number of supplied functions >to properly display each type of variable. This is a >job=20 >for the computer language, not the programmer.=20 >For examples, see almost any language other than=20 >asm or C.=20 > >In Eu, you can define a variable as an integer, and=20 >Eu won't let you assign a float to it. That's good. >However, as soon as you try to create an array of 2 or >more integers, all bets are off. =A0You can assign >anything,=20 >including floats or strings, to those "integer" array >positions. Are "arrays of integers" a useless concept? >I don't think so. > >Speaking of arrays, it's pretty well accepted that=20 >arrays of characters (AKA "strings") are also useful=20 >in computer programming. So how do you tell Eu to >create a variable that *must* be a string? Not one >that could be a string, or might just as easily be an >array of coordinates, or a list of pointers to C >routines ?=20 > >Structured data; believe it or not, a lot of=20 >programmers like to structure their data in some >meaningful form. Let's say, for example, I want to >keep=20 >track of my customers and how much they owe me. >( just an example, no one would really want to do >that,=20 >would they? ) > >"Joe", 12.99 >"Sue", 4.50 >"Jack", 9.94 > >Can you do this in Eu? Sure, except that if you >actually=20 >try to keep the names and the amounts together as a=20 >package, you find that there's nothing stopping you,=20 >or an inept employee, from changing the data to :=20 > >"Joe","applesauce" >24, 4.50 >NULL, 9.94 > >Sure, you can write routines to check each item as >it's=20 >entered - but isn't that what a so-called "high-level" > >language is supposed to do for us? > >Even user-defined types don't help here, for at least >two reasons:=20 > >1. Your routine has to check _every_ single item in >your=20 >"structure" whenever any _one_ item in that structure=20 >receives an assignment. In real life, this could mean=20 >dozens or hundreds of checks. Writing and debugging=20 >those routines is a chore, and everytime the structure > >changes even slightly, the UDT routines have to be >re-written.=20 > >2. What's worse, even after you have written that >complex type-checking routine, once you detect an <snip> > > y! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=3D393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=3D380455