TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Introducing Spider 0.1

142 点作者 alongub超过 10 年前

14 条评论

dang超过 10 年前
<a href="https://news.ycombinator.com/item?id=8618739" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8618739</a>
tinco超过 10 年前
What&#x27;s to love about this language:<p><pre><code> - &#x27;function&#x27; renamed to &#x27;fn&#x27; - syntax for message passing (a la Go&#x27;s channels) - syntax for promises - syntax for currying (!) - everything that coffeescript has </code></pre> In my opinion that seems to satisfy everything a modern Javascript programmer could want from a new language. I&#x27;m a CoffeeScript person myself and I love my super succinct code, but I&#x27;m also aware many people are turned off by lack of braces, and possibilities of ambiguity.<p>That and the fact that I&#x27;ve noticed my colleague has been rewriting callback code I wrote into ugly promise-like objects so they could be more powerful, so I think it&#x27;s a good time to be exploring for nicer ways of dealing with the issue, preferably with some sugar.
评论 #8671433 未加载
评论 #8671748 未加载
评论 #8671351 未加载
breuleux超过 10 年前
I installed spider-script through npm, but `spider somescript.spider` complains with $traceurRuntime not being defined. I can still compile the script, then require traceur and the script from another file, but I&#x27;d rather not have to do that just to try out the language :(<p>The FizzBuzz example is (still) bugged: it lacks semicolons and []s around [1...100].<p>Now for my thoughts: I like the way you handle globals, channels and async&#x2F;await. Currying syntax is nifty, I probably wouldn&#x27;t have chosen ^ but that&#x27;s a bit of an arbitrary choice I guess. For integer division I prefer &#x2F;&#x2F;, but I just realized you use that for comments. The module syntax works, although I prefer to group export declarations in a separate export or provide block.<p>I think the pattern matching is insufficiently powerful. Normally, pattern matching lets you declare variables as part of the pattern, so that it becomes a kind of switch on the different ways to deconstruct the input. I have an example of what I mean here: <a href="http://jsfiddle.net/f1ycatas/2/" rel="nofollow">http:&#x2F;&#x2F;jsfiddle.net&#x2F;f1ycatas&#x2F;2&#x2F;</a> . Matching the value of an existing variable could be done with syntax like `== n`.
dkarapetyan超过 10 年前
Ladies and gentlemen we already have TypeScript, Dart, clojurescript, scalajs, coffeescript, PureScript, elm, etc. More innovation in the web language ecosystem is not what is lacking. What is lacking is all the boring stuff like a sensible package management system, deployment mechanism, framework interoperability, etc. You know, all the un-sexy stuff that actual engineering requires.
评论 #8671305 未加载
评论 #8671318 未加载
评论 #8671290 未加载
评论 #8671357 未加载
评论 #8671358 未加载
评论 #8671295 未加载
评论 #8671334 未加载
评论 #8671321 未加载
msl09超过 10 年前
I love almost everything about this and dislike only a few things:<p>As k__ pointed I see no point in including semicolons, if you already have parenthesis that can be used to delimit expressions and newline characters, why include &quot;;&quot; ?<p>Another thing that I don&#x27;t like is how the language is encourages type weakness in circumstances that normally lead to a dozen pointless bugs in my software during the development process:<p><pre><code> a = -1 if a { &#x2F;&#x2F; Actually meant a &gt; 0 console.log(&quot;In if&quot;); } </code></pre> This could be avoided if languages didn&#x27;t implicitly convert int, float etc values into boolean in the conditional expression of if. The result wouldn&#x27;t even need a lot more code<p><pre><code> if Boolean(a) { </code></pre> That would probably require more code to implement into Spider in sections that might be performance critical. CG coders love to use those binary shortcuts in their code.
评论 #8671521 未加载
riffraff超过 10 年前
isn&#x27;t the fizzbuzz example bugged? Unless the language automatically identifies the most specific pattern I think the case [0, 0] should be the first?<p>EDIT: if it _does_ identify the most specific case, I think it&#x27;s worth pointing out.
评论 #8671327 未加载
k-mcgrady超过 10 年前
Is this a brand new language or more like Coffeescript (something that makes Javascript look nicer)? Either is fine I just couldn&#x27;t tell from the post.
评论 #8671157 未加载
viach超过 10 年前
&quot;brand new language to avoid JavaScript’s bad side while embracing its good side.&quot;<p>Why don&#x27;t just use the good side? Well, with all the tools available for JavaScript - static code analysers, type checkers and code coverage tools, is it really _that_ hard to just write this damn code without introducing a new language?
评论 #8671425 未加载
k__超过 10 年前
&gt; takes the best ideas of ... Python ... CoffeeScript<p>&gt; still got curly braces and semicola
评论 #8671469 未加载
评论 #8671434 未加载
评论 #8671708 未加载
Ironchefpython超过 10 年前
Any thought of doing a sweetjs implementation so I can compose Spider with other Javascript language extension (e.g. inline JSX templates)
评论 #8671404 未加载
izolate超过 10 年前
Nice one Alon. Still amazed at your development pace. Keep it up, buddy.
joaojeronimo超过 10 年前
Finally a language that targets ES5&#x2F;6 that I can use!
mounibec超过 10 年前
Looks so cool! I&#x27;ll give it a try
sebastianconcpt超过 10 年前
I don&#x27;t want to disencourage good initiatives and experiments, but if is not a technology that creates a &quot;space&quot; where &quot;Everything is a..&quot; then I won&#x27;t be excited because is not going to be paradigmatic by design.<p>When &quot;Everything is a..&quot; you&#x27;re forced to do a lot with little and that&#x27;s really powerful. And creates a paradigm.<p>Some examples of it:<p>LISP: &quot;Everything is an Expression&quot; Haskell and Miranda: &quot;Everything is a Function&quot; Self and Smalltalk: &quot;Everything is an Object&quot;
评论 #8671299 未加载
评论 #8671538 未加载