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.

Haskell In New Clothes

121 pointsby culturedsystemsalmost 5 years ago

24 comments

curryhowardalmost 5 years ago
I love seeing new Haskell projects, though I personally would rather just stick with Haskell&#x27;s clean syntax:<p><pre><code> data Maybe a = Nothing | Just a </code></pre> ...over this:<p><pre><code> data Maybe&lt;a&gt; { Nothing, Just(value: a) } </code></pre> I understand that programmers coming from mainstream languages might feel uncomfortable without all those angle brackets, curly braces, and parentheses (why do C-like languages have so many ways to syntactically group things?), so if this project helps them ease their way into Haskell I totally support it. However, a small part of the joy of Haskell is freeing yourself from the arbitrary syntactic boilerplate that most languages have.
评论 #24099067 未加载
评论 #24099481 未加载
评论 #24099038 未加载
评论 #24099089 未加载
评论 #24098884 未加载
评论 #24099465 未加载
nervous_northalmost 5 years ago
I personally prefer Haskell&#x27;s syntax. I find myself using JavaScript transpilers like BuckleScript to take me into a typesafe land with ML syntax rather than using a language like TypeScript with Java like syntax.<p>That said, I really appreciate seeing work like this. Haskell is super powerful and it&#x27;s great to see transpilers like this that are lowering the bar of entry to Haskell to those more familiar with the traditional languages. Nice job!
_alex_almost 5 years ago
I dont think a lack of curly braces is whats keeping haskell from taking off. It’s the “I need to go study category theory to be able to read the docs on any useful package” problem and the proliferation of language extensions. Taking some of the ivory tower out of the learning curve will do a lot more than adding some tokens.
japanoisealmost 5 years ago
Contrary to the other commenters, I see this as a huge improvement. Maybe I&#x27;m more used to languages like C rather than what, ml, python, pascal?
spankaleealmost 5 years ago
Whoa, this is amazing! I find this example much, much easier to read:<p>&gt; For example, where Haskellers would write:<p><pre><code> f = average . filter (&gt; 0) . map normalize </code></pre> &gt; in hinc the idiomatic translation would be:<p><pre><code> let f(lst) = lst.map(normalize) .filter((x) =&gt; x &gt; 0) .average </code></pre> These seems like very sane, pragmatic choices considering the massive segment of programmers used to C&#x2F;Java&#x2F;JavaScript derived syntax.<p>Now, if the currently top comment about category theory could be addressed, I think we&#x27;d have something.
rattrayalmost 5 years ago
The thing that&#x27;s always turned me off Haskell is language extensions and the associated fractal fracture of the language. Sorry, I don&#x27;t want to learn a dozen different styles of a language.<p>PureScript always seemed a little more appealing from that perspective, but doesn&#x27;t seem to have really caught on (eg; <a href="https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?date=today%205-y&amp;geo=US&amp;q=purescript" rel="nofollow">https:&#x2F;&#x2F;trends.google.com&#x2F;trends&#x2F;explore?date=today%205-y&amp;ge...</a>)
评论 #24100869 未加载
评论 #24099524 未加载
评论 #24099426 未加载
rishav_sharanalmost 5 years ago
As far as functional languages go, F# (and thus OCaml which is the parent language of F#) IMO has the best syntax. The code is actually readable even if you haven&#x27;t ever written a functional program and everything feels super practical about it.<p>Its a shame that F# doesnt gets the attention it deserves.
quotemstralmost 5 years ago
I want to like Haskell, but I think lazy evaluation is fundamentally broken. Haskell&#x27;s facility for optional strict evaluation doesn&#x27;t really repair the fundamental defect, which leads to memory leaks and unpredictable performance. And certain magic functions are strict anyway, and you just have to know what those are. I just don&#x27;t see making lazy sequences easy as being worth the cost of making lazy evaluation the syntactic default.<p>Given that Haskell is fundamentally and irreparably broken (IMHO) in this way, it seems like a waste to devote effort to it instead of better functional languages like ML.
评论 #24102653 未加载
logicchainsalmost 5 years ago
To me the biggest advantage of this that it&#x27;s not whitespace sensitive, which makes it way easier to refactor and automatically indent&#x2F;format code. Although I&#x27;d have preferred something more ML-like.
评论 #24098973 未加载
hsavit1almost 5 years ago
As a Typescript developer, I really like this! Haskell has always been difficult for me to grok but this syntax makes bridging the gap really intuitive. Bravo!
nameloswalmost 5 years ago
It&#x27;s a great attempt, just like ReasonML.<p>Maybe the &#x27;data&#x27; could be called &#x27;enum&#x27;? I believe Rust&#x2F;Swift ADT definition use keyword &#x27;enum&#x27; and it might make it more familiar to the mainstream.<p>While the &#x27;await&#x27; is pretty recognizable, the word itself seems to be too coupled with asynchronous operation too much.
dunefoxalmost 5 years ago
This looks so noisy compared to normal Haskell syntax.
评论 #24099486 未加载
k_bxalmost 5 years ago
I think there’s a good use case for such a thing: make it as compatible with current Rust syntax as possible, including keyword names. This way you’d make use of people’s familiarity with Rust, and give them “lookalike Lang with better types and a GC”.
IshKebabalmost 5 years ago
Honestly the syntax of Haskell is unnecessarily weird and I think this project is proof that it doesn&#x27;t have to be. Haskell&#x27;s syntax has really put me off learning it. I&#x27;d even say some parts of the syntax are elitist - they are almost deliberately - and unnecessarily! - hard for beginners but great if you are a language nerd and understand currying, lambda calculus and so on.<p>This is way better, but to be honest I don&#x27;t think I&#x27;ll use it because the extra easiness of learning with a sane syntax is probably going to be not worth the extra hassle caused by not learning the syntax that everyone else uses.<p>Still, great job! Now do the git CLI. :-)
hyperpallium2almost 5 years ago
C-like <a href="http:&#x2F;&#x2F;james-iry.blogspot.com&#x2F;2009&#x2F;05&#x2F;brief-incomplete-and-mostly-wrong.html?m=1" rel="nofollow">http:&#x2F;&#x2F;james-iry.blogspot.com&#x2F;2009&#x2F;05&#x2F;brief-incomplete-and-m...</a>
brudgersalmost 5 years ago
companion site, <a href="https:&#x2F;&#x2F;serras.github.io&#x2F;hinc&#x2F;" rel="nofollow">https:&#x2F;&#x2F;serras.github.io&#x2F;hinc&#x2F;</a>
li4ickalmost 5 years ago
I mean...why not just go full OCaml at this point?
javcasasalmost 5 years ago
Without OO as main paradigm, and without being shoehorned into the JVM, Haskell has no chance to be mainstream. Stop trying to make it mainstream, it will only remove from Haskell what makes Haskell great.
gnufxalmost 5 years ago
How do people who are thrown by juxtaposition as function application and point-free style cope with Unix shell pipelines?
dreamcompileralmost 5 years ago
Improving Haskell with Javascript syntax is like improving a Mark Rothko painting by sprinkling glitter all over it.
评论 #24099427 未加载
ameliusalmost 5 years ago
Huh, this is like saying &quot;who needs parsers?&quot; Well, they&#x27;ve been invented for a reason. So after the NoSQL movement, we now have NoParser. I fear we might end up back at assembly or even microcode. Sure it will make life simpler, but it&#x27;s the wrong kind of simple.
agumonkeyalmost 5 years ago
oh god, no top level patterns<p>it&#x27;s such a beautiful thing ..
评论 #24101045 未加载
评论 #24099500 未加载
platzalmost 5 years ago
well, it&#x27;s cute trick - not sure what the utility is.
wseymouralmost 5 years ago
I&#x27;m looking forward to playing with this.<p>Coming from a C-style language background, I&#x27;ve always found the syntax of languages such as Haskell and ML to be alien, to the point that I can&#x27;t get my head into learning one of them, despite their obvious power and utility.<p>I&#x27;ve been looking for some kind of C-style dialect for one of these languages for a long time, so thank you very much for creating this.<p>At the risk of hijacking this thread; is anyone here aware of other projects for Haskell or other languages that achieve a similar goal?
评论 #24103766 未加载