

Ela, dynamic functional language - T-A
http://elalang.net/

======
JadeNB
The language proudly boasts on its home page that its `head` function has the
same wart as Haskell's (i.e., not handling empty lists)? Combining this with
an explicit use of the `Option` monad just seems like teasing.

(EDIT: Oops, I meant its "distinctive features" page
[http://elalang.net/About.aspx#features](http://elalang.net/About.aspx#features)
, under "Algebraic Types".)

(It's just my assumption that it doesn't handle empty lists, because it
returns the literal first element of a non-empty one; but neither the Prelude
[http://elalang.net/docs/Article.aspx?p=lib\prelude.htm](http://elalang.net/docs/Article.aspx?p=lib\\prelude.htm)
nor the list module
[http://elalang.net/docs/Article.aspx?p=lib\list.htm](http://elalang.net/docs/Article.aspx?p=lib\\list.htm)
seems explicitly to mention the `head` function on lists (as opposed to
strings or sequences) at all, so it's hard to say for sure.)

~~~
tome
The "About" page that you linked has the code

    
    
        x = head xs //x is Some 1
    

which suggests 'head' is of type 'a -> Option a' and does not have the wart
you are talking about.

~~~
tel
The example is a bit misleading there. To be more clear using types there's

    
    
        xs :: [Maybe Int]
        head xs :: Maybe Int

~~~
tome
Oh yeah, silly me!

------
tel
Reading about this language gives me such a strange feeling. It makes me think
of the cargo cults who worship airplane tributes due to once an airplane
landing and providing supplies.

Ela is clearly inspired by Haskell. It copies syntax and surface-level
features mercilessly. It's also devoted to being dynamically typed which
dramatically undermines the meaning and development of those very features.

It makes for an interesting experiment. I can't say whether or not a dynamic
language of this design is easy to work in compared with others.

But I read things like Ela's "algebraic data types" and shudder a bit (and
then a lot when I find the "Circle (& 'hello')" example). They're definitely
_inspired_ by ADTs, but also definitely nothing similar. These ADTs are that
alien from MIB who steals human skin---on the surface you might confuse them,
but a different sort of life boils underneath.

------
FraaJad
very similar to pure -
[http://purelang.bitbucket.org/](http://purelang.bitbucket.org/) (not
purescript).

~~~
JadeNB
What makes you think of Pure, as opposed to Haskell as mentioned on the page
and by howling
([https://news.ycombinator.com/item?id=9555980](https://news.ycombinator.com/item?id=9555980))?
The influence of Haskell is clear, but it's not so obvious to me that this
language uses term rewriting (as in Pure) in any fundamental way. Maybe I
missed it?

------
sgeisenh
_Ela is a type safe, strictly typed language, which is, however, not burden by
limitations of any particular type checker._

By nature, a language which is type safe and strictly typed must be burdened
by the limitations of a "particular type checker." This is weak type safety at
best. And it looks like there are runtime class checks, so you have all of the
traditional drawbacks of dynamic languages.

~~~
dllthomas
In principle, the type checker could be pluggable. That would mean the
language isn't burdened by the limitations of any particular type checker,
although it would almost certainly be burdened by complications at the
boundaries of where one type checker is used versus another. It also might be
reasonable to insist that such a system represents a family of languages
rather than a single one.

------
loqi
> Unlike many other languages, Ela doesn't make any trade-offs, trying to
> combine distinct programming paradigms that don't fit well together.

The author may want to tone down that claim - combining Haskell-style FP with
dynamic typing certainly entails some trade-offs, regardless of whether or not
they think it's a good idea.

------
howling
From what I see it is pretty similar to Haskell besides some minor syntax
differences, strict evaluation by default, and dynamic typing. So why should I
use this over Haskell?

~~~
tel
The typing variation feels like it's going to so strongly change the pragmatic
use of this language that the best I could say is that it is very distantly
inspired by Haskell.

------
ColinWright
Oh look, one of my pet hates. Displaying a sieve that claims to be the Sieve
of Eratosthenes, and yet it does modulo tests, and hence isn't.

 _Edit: It was by chance that it happened to be the example in the "A taste of
Ela" box at the top. Reloading the page makes the example change to something
else, so if you are wondering what I'm talking about, reload the page until
the "taste" box explicitly calls something the Sieve of Eratosthenes. It
isn't._

~~~
JadeNB
I guess that the Sieve of Eratosthenes is the algorithm implemented in
[http://www.cs.hmc.edu/~oneill/papers/Sieve-
JFP.pdf](http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf) ?

~~~
ColinWright
That paper does correctly deal with the issue. The conclusions in section 4
give an excellent summary.

