TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Gluon – A static, type-inferred and embeddable language written in Rust

203 pointsby Lapzalmost 7 years ago

13 comments

Xeoncrossalmost 7 years ago
Looks really interesting. The readme actually got me started with lots of good examples.<p>Side note though: I won&#x27;t ever use a symbols-instead-of-words language unless I have to.<p><pre><code> let { (*&gt;), (&lt;*), wrap } = import! std.applicative </code></pre> This is not my idea of good language syntax. I like jr developers, non-X language developers, hardware guys, and even graphic designers to be able to understand my code.<p>Consider simple string concatenation. This is what it looks like in Objective-C:<p><pre><code> NSString *one = @&quot;Hello&quot;; NSString *two = @&quot;World&quot;; NSString *three = [[one stringByAppendingString:&quot; &quot;] stringByAppendingString:two] </code></pre> Total fail for something so simple.
评论 #17380866 未加载
评论 #17377353 未加载
评论 #17377621 未加载
评论 #17377213 未加载
评论 #17381396 未加载
评论 #17377302 未加载
评论 #17377566 未加载
jdreaveralmost 7 years ago
Gluon recently added implicit arguments with the latest release (see <a href="http:&#x2F;&#x2F;marwes.github.io&#x2F;2018&#x2F;06&#x2F;19&#x2F;gluon-0.8.html" rel="nofollow">http:&#x2F;&#x2F;marwes.github.io&#x2F;2018&#x2F;06&#x2F;19&#x2F;gluon-0.8.html</a>). In spirit it is like modular implicits (<a href="https:&#x2F;&#x2F;arxiv.org&#x2F;pdf&#x2F;1512.01895.pdf" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;pdf&#x2F;1512.01895.pdf</a>). This is really exciting because modular implicits represent a pragmatic balance between the flexibility of ML modules and the convenient overloading of type classes.<p>Another cool feature of Gluon is modules are basically just records. This is a strict improvement over ML modules in my opinion. (See <a href="http:&#x2F;&#x2F;gluon-lang.org&#x2F;book&#x2F;modules.html" rel="nofollow">http:&#x2F;&#x2F;gluon-lang.org&#x2F;book&#x2F;modules.html</a>)<p>Congrats on the recent release!
评论 #17380147 未加载
eximiusalmost 7 years ago
:sigh: I hate function call syntax without parens. It makes code <i>much</i> more difficult to read and, if it supports first class functions, passing around no arg functions is harder than it should be.
评论 #17377927 未加载
评论 #17377953 未加载
评论 #17380404 未加载
评论 #17380113 未加载
kccqzyalmost 7 years ago
Looks like a great language that&#x27;s a nice mix of OCaml and Haskell!<p>What&#x27;s the interop story? If I am embedding this language inside my app, I reasonably want to make data structures in my app to be available through this language. How would that work?
评论 #17377506 未加载
losvediralmost 7 years ago
Now <i>this</i> is what every language landing page should be like. I love the nontrivial code snippet solving a fun little problem front and center.
wtetzneralmost 7 years ago
Wow, I&#x27;ve been wanting something just like this for Rust. And it has row polymorphism!
评论 #17378853 未加载
lasagnaphilalmost 7 years ago
It would be great if someone made a UI framework with Rust and made this the scripting language (making the experience Elm-like, but with a better type system and without web technologies)
rixedalmost 7 years ago
Too bad it has a different heap per thread. If I want to extend a C (or rust) posix-multithreaded program, it means I can&#x27;t easily use gluon to access the state of my program (which requires accessing posix-multithreaded protected variables in the normal heap). Same thing that makes Lua useless to simply extend actual, pre existing C programs.<p>Anyway, I&#x27;m still happy to see that more modern languages than algol have gained enough influence than the choice of type system, type inference and non C like syntax is not frowned upon anymore.
knoctealmost 7 years ago
Looks like F# but has a big design mistake in my opinion (which F# doesn&#x27;t): the symbol &#x27;=&#x27; in a functional programming should be tied to comparison, not assignment. (The approach taken here is using &quot;==&quot; for comparison, which is less ugly than JavaScript&#x27;s &quot;===&quot; but still ugly.)
childintimealmost 7 years ago
As the `in` keyword seems key to understanding the language, could someone elaborate on it?<p>It isn&#x27;t obvious after reading the intro on <a href="http:&#x2F;&#x2F;gluon-lang.org&#x2F;book&#x2F;syntax-and-semantics.html" rel="nofollow">http:&#x2F;&#x2F;gluon-lang.org&#x2F;book&#x2F;syntax-and-semantics.html</a>.
评论 #17377486 未加载
f311aalmost 7 years ago
So many new languages lately, does anyone is risky enough and using such languages in production?
tadfisheralmost 7 years ago
This looks very similar to Nix, with improvements such as real typing and lack of semicolons. That&#x27;s a very good thing.<p>Any plans for a purely-functional variant (i.e. a single expression per evaluation)?
评论 #17378425 未加载
badsavagealmost 7 years ago
I feel like every day a new programming language presented on HN. Maybe you didn&#x27;t realize, but we know CL&#x2F;scheme&#x2F;clojure already and have no turning back..