The Elena Programming Language
elena-lang.github.io
elena-lang.github.io
If I were to try and make this language interesting to the HN audience, I'd start with two items:
* What is interesting in Elena, compared to Python?
* What is interesting in Elena, compared to ES6?
* For bonus points: What is interesting in Elena, compared to Smalltalk?
Without answering this questions, I don't see why I should take a look. And there must be some differences, e.g. around the concept of first-class messages, which apparently are related to Smalltalk.
> Why not to treat the message like a normal language element with which different operations are possible : loading, passing, modifying, dispatching? Could we do it without using reflection all the way?
I don't know how the guts of smalltalk are implemented, but, if there's a lot of reliance on runtime reflection involved, then maybe there's your answer.
I think, then, that the answer to the first two is, "It's like Smalltalk."
For me, "Yeah it sounds cool, but let's see some code" is my usual response to new programming languages.
In that case, complicate messages with lots of parameters can be pre-built with parameters partially filled in. The pre-built messages can then be repeatedly used subsequently.
I think that's how it works. OTOH, I could have completely misunderstood the first class message idea. Someone more familiar with the language can probably explain better.
The gain seems smaller than the gain from first class procedures, but it is an interesting idea, which might avoid some lambda wrapping in the code.
I implemented "megacut" in guile, which is a clojuresque lambda shorthand: #%(+ %1 5 (* %2 4)) => (lambda (%1 %2) (+ %1 5 (* %2 4))) in about 30 lines of code (unhygienically, though, but that should be a small fix in a psyntax-based scheme)
We do have some megacut wrapping overhead then though ;)
Can you post a link to the macro on the Guile user list? Perhaps someone can rewrite it to a hygienic macro. Some people there very proficient in macrology. I am not that proficient in macrology.
I am also trying to maintain a list of libraries and things for Guile, which I could add this too.
Doing it in another way than "Any binding looking like %n and %& will be captured and shadowed" is pretty much unsolved using any standard scheme. I could probably hack something together using syntax-locally-bound-identifiers, but then I would have to implement local macro expansion (which is possible. I'm just lazy!).
The link is https://hg.sr.ht/~bjoli/megacut/
Btw, the link for guile-for-loops should be updated in your list: https://hg.sr.ht/~bjoli/guile-for-loops
> abstract classes, interfaces, singletons, class constants,
> named constructors, variadic methods / constructors and
> class extensions.
Half of these are anti patterns that I appreciate other languages (Go, Rust) leave out (non-virtual inheritance, singletons, ...). Elena announcing them as features makes me wary.
[0] https://github.com/ELENA-LANG/elena-lang/wiki/ELENA-Programm...
Destructors are usually hard to support cleanly in the presence of obligate GC. Given destructors, GC turns out to be unnecessary. Lacking destructors, managing non-memory resources becomes foolishly difficult, particularly across library boundaries.
Where I have seen GC used in C++ runtimes, it is confined to specific, graph-like structures, where tracking cycles would be messy; or provided to obligate-GC languages being interpreted. In both cases it is always clear whether an object's lifetime is tracked, and the C++ runtime does not see the objects.
But after all I don't care much. I'm more interested in other parts of language designs :)
This is terrible.
Most special symbols have escapable names so for example Julia have a composition operator (∘) In the repl or supported editors (atom and vs code), if you type \circ then press <tab> the repl or the editor will replace that with the symbol ∘
Now, I am not saying that this is better than ascii characters, I still prefer ascii characters, and I still find that Unicode symbol even with good editor support are harder to type, and also in some case like in the case this composition operator ∘ hard to read
I just don't think its not terrible anymore, its passable, and I understand why some people might like it more, but good editor support is a must
0: foo[diamond_caret / indentical_middot - questionquestion ] . ceil_floor
1: utf8: E2 8B 84 CB 84 E2 88 95 E2 89 A1 CE 87 E2 80 92 E2 81 87 E2 81 86 E2 80 A4 E2 8C 89 E2 8C 8B
Imo it's fine to allow Unicode. Latin will still be the de facto standard character set, but it allows international users to code natively and allows for Easter eggs.
The unicode is normalized. That can be used for trickery in rare circumstances. "global" is a keyword, but "𝐠𝐥𝐨𝐛𝐚𝐥" isn't, so you can use that if you absolutely require an attribute called "global".
Rust is good example of a PL design that introduces new concepts (around ownership.)
Pony is another good example of PL design, for the same reason as Rust, but it differs in important ways by introducing Reference Capabilities. I tried to get some attention to it the other day: https://news.ycombinator.com/item?id=24201754
What new ideas does Elena introduce?
I wrote some code in it and it was extremely fast, in the same order of magnitude as Rust/C. But it was quite complex to write, unfortunately, compared to the Rust version (which also guarantees no deadlocks and safe concurrency). On the other hand, the code looked quite a lot prettier due to its Python-like syntax.
Anyway, it's one of those tools I keep in the shed, hoping to one day find a good use for it... just hope it continues evolving (specially running Actors on multiple machines would be a real killer feature - making Pony like a typed Erlang with beautiful syntax).
Pony is still pretty cool though
Sounds poetic enough to me to get into!
not sure what the secret entry requirements are for that club or what the point is
AFAIK you aren't accountable for your invitees on a day-to-day basis. It just reflects poorly on you if you invite many poorly behaved people - this isn't substantially different from everyday life.
> Perhaps no one there knows me. Why would anyone vouch for someone they don't know?
Some people do invite everyone who asks. They can have their invite rights disabled or in extreme cases be banned from the site. This is relatively rare.
You can see examples of this at https://lobste.rs/moderations?moderator=%28All%29&what%5Buse....
> Wouldn't that make vouching a useless hurdle?
Lobste.rs has a small audience and 3 moderators. The moderation is also much more active than HN - moderators will send private warnings, delete off-topic posts, etc. Moderator actions are publicly visible at https://lobste.rs/moderations. Vouching raises the barrier to entry and allows the moderators to keep up with the workload.
>
> Windows
> Linux
Sorry guys, not for me ...
JVM languages are in a silo off to the side where they only interop with each other