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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Spider Programming Language

117 点作者 alongub超过 10 年前

16 条评论

klibertp超过 10 年前
&gt; CoffeeScript (and its derivatives: LiveScript, Coco, etc) have serious issues of ambiguous code, alien syntax and scoping problems.<p>How long will programmers think of &quot;alien syntax&quot; as a problem? I don&#x27;t understand it at all - syntax should fit the problem domain and language semantics first and foremost, NOT expectations of programmers writing in other languages. It makes absolutely no sense - from a language design perspective - to invent a new, interesting language and then try to fit it into some &quot;standard&quot; syntax. In my mind this misses at least half of a point of creating a language in the first place!
评论 #8619530 未加载
评论 #8619346 未加载
wiremine超过 10 年前
I&#x27;m still a bit unsure about these sorts of projects. I like the idea of improving Javascript&#x27;s rough edges, but whenever I start a new project, I always seem to stick with plain old javascript.<p>That said, Spider feels like it is heading in the right direction:<p>- It embraces JS&#x27;s prototype OOP. I&#x27;ve never liked how CoffeeScript tries to add traditional classes. Not sure the syntax is right, but I appreciate the goal.<p>- It adds just enough &quot;modern&quot; features and syntax to feel like Javascript without requiring me to learn a whole new language.<p>Feels like modularity is missing, though. Is there any support for &quot;require&quot; or &quot;import&quot; or something similar?
评论 #8619319 未加载
评论 #8619338 未加载
Lerc超过 10 年前
Welcome to the fray. I kind of like that there are so many JavaScript wrapper languages turning up. It allows for cross-pollination of ideas and hopefully in the long term those that work the best for people in practice will establish themselves a niche.<p>That said, I don&#x27;t think this is the one for me.<p>I think I would lean towards halfway between Spider and JavaScript<p>I&#x27;d prefer to keep some bits from Javascript<p>* function instead of func.<p>* bracketed if and while conditions.<p>* no list comprehensions (but I could just choose to ignore).<p>* no ranges (unless only in case conditions)<p>* not sure about # for int div.<p>From spider I&#x27;d keep<p>* Default parameters<p>* splats<p>* ?<p>* ??<p>* * *<p>* logical operators<p>* for loops (but bracketed)<p>* extends and super.<p>and I&#x27;d add sugar.js <a href="http://sugarjs.com/" rel="nofollow">http:&#x2F;&#x2F;sugarjs.com&#x2F;</a> as standard
评论 #8620301 未加载
vinodkd超过 10 年前
Nice! I started on something like this a while ago: <a href="https://github.com/vinodkd/betterscript" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vinodkd&#x2F;betterscript</a>.<p>You have a slightly larger goal - a better js with some useful syntax from other languages&#x2F;efforts. Mine was just a better javascript.<p>But: I did have a module syntax. No plug here, btw; feel free to borrow any&#x2F;all syntax and kudos for getting it done:)
izolate超过 10 年前
This is exciting. I&#x27;ve been experimenting with languages to replace JS with, and have only liked Rapydscript so far (due to an existing familiarity with Python).<p>Syntactically, I see some inspiration in Spider from both Python and Go. As this is still in alpha stages, any chance you&#x27;ll remove the semicolons? That would push the syntax into &quot;beautiful&quot; realm for me.
评论 #8618884 未加载
fizzbatter超过 10 年前
The only thing i don&#x27;t like so far, is `func` <i>and</i> `-&gt;` both expressing functions. I use Coffee a ton, and Golang, so oddly enough i love both syntaxes.. but i don&#x27;t like multiple ways to declare a core feature like functions.<p>Just my 2c.<p>Fwiw, i&#x27;m going to be trying this out asap - I have high hopes for this replacing my very heavy CoffeeScript usage!
评论 #8619429 未加载
评论 #8619706 未加载
评论 #8619550 未加载
评论 #8619597 未加载
评论 #8619354 未加载
woah超过 10 年前
I&#x27;m worried by the focus on OOP in the examples. I hope that OOP is not a focus in the language. This nice and simple enough of a language that I could see JS people getting on board, and using this for real JS stuff.<p>I&#x27;m afraid that an inordinate focus on OOP will alienate JS devs, who are already good at writing in a functional style and don&#x27;t need it.<p>The people who <i>will</i> appreciate the trappings of OOP are more than likely the typical classically trained programmers, who will write 300 lines of Spider on the frontend of their Python hobby project, and not touch it again.
评论 #8620645 未加载
评论 #8619617 未加载
_xhok超过 10 年前
i&#x27;m always curious, why keep brackets? if blocks can be implied by whitespace (that vi can handle for you), what do explicit brackets buy you in exchange for the time it takes to type them?
评论 #8619451 未加载
评论 #8620422 未加载
评论 #8619269 未加载
drewying超过 10 年前
Kudos to the creator. Writing something like this takes a lot of effort and it looks like they did a great job! Well done!<p>With that said, on wider level, what&#x27;s the allure of these JavaScript replacement languages? Is JavaScript syntax really that difficult for some developers to wrap their head around? I can understand something like Dart that has an underlying goal of performance, but the purposes of things like this or CoffeeScript genuinely confuse me.
评论 #8619333 未加载
评论 #8619533 未加载
评论 #8619344 未加载
评论 #8619560 未加载
drawkbox超过 10 年前
One thing for sure is apparent in the new Javascript movement is that every framework tries to script your Javascript and not be Javascript. Nothing against experimentation and there are merits to generation to target platforms, but this is a common theme.<p>The NBL is Javascript yet everything to support it moves away from it? Very strange, do people hate Javascript that much?<p>Try my new scripting language, it will help you script your Javascript.
Jaecen超过 10 年前
This looks to be an implementation of the concepts (but not the language) proposed in <a href="http://www.walkercoderanger.com/blog/2014/04/what-coffeescript-should-have-been/" rel="nofollow">http:&#x2F;&#x2F;www.walkercoderanger.com&#x2F;blog&#x2F;2014&#x2F;04&#x2F;what-coffeescri...</a>. Several of the terms used are exactly the same.
评论 #8619236 未加载
DonGateley超过 10 年前
Is backward transliteration from pure JavaScript to Spider possible so that one can deal exclusively with Spider and not have to learn JS in order to deal with other people&#x27;s code?<p>If one must know both in order to be an agent in the real world then its utility is somewhat limited.
评论 #8620464 未加载
评论 #8619928 未加载
oweiler超过 10 年前
<p><pre><code> Additionally, loose typing can be one of JavaScript&#x27;s best features if used correctly. </code></pre> For me, this is by far the worst feature of JavaScript.
FreezerburnV超过 10 年前
The website states that Spider is still a work in progress. How complete is it at this point? Is it usable for hobby projects at this point in time?
评论 #8619198 未加载
mariusc23超过 10 年前
Neat! Did anyone make a grunt plugin yet? :)
评论 #8619428 未加载
notastartup超过 10 年前
I&#x27;m sorry but the syntax is absolutely gash! This is like a horrible lovechild between Python and Coffeescript gone terribly terribly wrong. If that was the selling point then its a no go from me. I know this sounds harsh but I actually thought that this was a language to create web crawlers.<p><pre><code> func TimeMachine(pilot) { this.pilot = pilot; this.go = func (noise) { ::console.log(noise); }; } func Tardis() extends TimeMachine(&quot;The Doctor&quot;) { this.go = () -&gt; super.go(&quot;vorp vorp&quot;); }</code></pre>
评论 #8619630 未加载