Talk:Euphoria (programming language)
I'm sure this is a worthy subject, but claims like "easier to learn than BASIC" and "fastest interpreted language" are just advertising mumbo-jumbo. Sure, you want to have who designed it and what their goals were, but if I'm looking at an enecylopedia article about a programming language, I want to know who uses it and for what, what it looks like (maybe some sample code?), what actual features it has in plain English, and a link to their website if any.
Actually not just ad mumbo-jumbo, I believe those were specific design goals of the language...I'm having a bit of difficulty wording them objectively though. There are benchmarks and such, but I didn't want to get into technicalities. There's a link to the website at the bottom. If you want sample code, I can accomodate. :) Is it a bit better now?
Looks better to me anyway. We can also soon put this under euphoria (programming language) or perhaps euphoria (prog. language), because CliffordAdams has just come out with the latest version of UseMod. --LMS
However
This is actually a language goal. I also can guarantee you that it's easier to learn than basic.
I have used and participated in the development of this language (and external freeware libraries) for 10 years now, in this time I have never heard anyone say BASIC was easier to learn.
It may also be said that the language construct is simple, yes. But it's impossible to say write a core windows program without using pointers, so yes you use them all the time, and no, the language does not protect you from this. It's an impossibility.
That's a problem with the windows API really, because when I make a windows program in Euphoria, it's subject to exactly the same memory faults and errors as if I had made it in C, it just happens to be about 10 times faster to actually code.
"Not using pointers" etc is not actually a language construct is what I mean, intrinsically it doesn't matter if the language supports pointers or not, the reality is you use them regardless of the support. And just because the language doesn't support them, doesn't mean you get pointer errors because you allocated the memory with the Windows GlobalAlloc() command.
A pointer is really more NOT a language reference. It's just (usually) a 32-bit integer which points to a memory offset. Any language is capable of using this really, and no language can ever protect you from undesired results.
I have to agree that Euphoria is easier to learn than BASIC, provided you intend to learn the entire language in each case (not just a subset).
More importantly, Euphoria has fewer built-in limitations (which you also have to learn about, but which are seldom documented :)
As far as speed is concerned, it's easy to prove for yourself that Euphoria is faster than most other interpreted languages in most instances. Of course it's often possible to craft a test which will show that any language X is the fastest for some task, if you choose that task carefully.
But what matters to me is that Euphoria is fast enough to use commercially, and no one asks me if I can "speed up" their applications. If I had to write everything in C (or C++, Delphi, COBOL, Fortran...) I would get 1/3 as much work done, and therefore be making 1/3 as much per hour.
EUPHORIA's "Hello, World!"
puts(1, "Hello, World!")
memory
sure if you're doing a single function program then you will not need to explicitly allocate or deallocate memory. to develop and full application in linux gui's or windows, you have to allocate memory period and be subject to the pitfalls of doing this. who said in euphoria you don't need to allocate or free memory? it supports this explicitly, and thus allows you to use linux .so and windows .dll files and hence have access to the relative api. by saying that euphoria does not need to allocate memory could be interpreted as in a way saying it is less powerful than C, which is a dubious speculation. euphoria supports direct memory allocation in a far more sophisticated manner than c.