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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

CoffeeScript is Afrikaans JavaScript

53 点作者 appleton超过 13 年前

12 条评论

alinajaf超过 13 年前
Like HAML before it, coffeescript is more like 'piglatin with shortcuts' to me, i.e. you have to mentally make a transformation on the javascript you were going to write while simultaneously stripping away unnecessary crud.<p>This is somewhat analogous to the stage in learning a spoken language where you're mentally translating (rather than just articulating directly in the target language). Unlike a spoken language however, in haml/coffeescript this phase only needs to last about an hour, instead of months or years.<p>P.S. I have a pet theory that bi-linguals are more 'intuitively comfortable' with what I call 'transformation' languages like HAML and Coffeescript, probably because they're used to cross-compiling their own speech while learning their second language. Not based on any scientific research but it appears to play out in my current office.
评论 #3561767 未加载
评论 #3562634 未加载
评论 #3568629 未加载
jgfoot超过 13 年前
An underappreciated benefit of computer programming "languages" is how human begins use them to communicate with other humans. Once you get two or more programmers working on a project, they have to be able to write code that the other programmer can readily understand. Programming languages advance this goal to varying degrees; assembly does it poorly, and so does obfuscated C or Perl. CoffeeScript, on the other hand, seems to have borrowed language features that enhance this human-to-human communication ability: significant whitespace, easily comprehensible object models, etc.
sgt超过 13 年前
Interesting comparison. I speak Afrikaans in the office every day (although it's not my mother tongue) and I do appreciate the simplicity of the language. It's also really cool in the same way Klingon is cool, i.e. some things can only be said in Afrikaans.<p>I must point out that the language itself is not as simple ("kitchen dutch") as the author makes it out to be though, in fact it's in my opinion just as sophisticated as dutch - albeit with slightly simplified grammar and spellings.
评论 #3561713 未加载
jmilloy超过 13 年前
This sort of analogy doesn't go very far for me because spoken languages evolve organically and continually in ways that computer programming languages do not. My compiler/interpreter doesn't meet me half way when I make small human-comprehendible changes. Even spoken languages that are engineered grow and change in-use.
ilitirit超过 13 年前
I suppose it depends on your mother tongue.<p><i>KoffieSkrip is nie eintlik 'n Afrikaanse Javaskrip nie.</i><p>Afrikaans has a few quirks and oddities that would make it seem strange to English speakers. For example, the Afrikaans sentence above means "CoffeeScript is not actually an Akfrikaans Javascript". But to someone who is unfamiliar with the language, the structure might imply a double-negative ("CoffeeScript is not actually an Akfrikaans Javascript not").
评论 #3562297 未加载
mseebach超过 13 年前
I'm not sure I understand why CoffeeScript should be easier to understand for a backend developer than JavaScript?
评论 #3561826 未加载
lloeki超过 13 年前
&#62; Simple grammar ... verbs do not conjugate differently ... This made me wonder about all those complicated grammar rules<p>It reminds me that Japanese has a very simple grammar regarding verbs.<p>There are very few, clearly identifiable groups based on suffix (I seem to recall it's three groups ~u, ~iru/~eru and irregulars), they are basically invariable, and have only two tense, past and present (plus each having a negative form). Time is more often than not purely contextual. Going even farther, subjects and objects are often omitted altogether,adding to the context you have to maintain. Also, there are only two irregular verbs (kuru and suru).<p>It's a bliss when you talk to someone and only a few words can bear a lot of meaning (no S) thanks to the context. At some point it feels like perl :-)<p>Now you might think that japanese got it right but then you learn to count stuff and holy cow you're in for a brainfuck as numbering things vary depending on <i>what</i> you're counting. Yay. But if it was too easy it wouldn't be so charming :-)
trustfundbaby超过 13 年前
<i>It can help Ruby developers to get going with Javascript because of its similar syntax, and it takes care of some of the bad parts in the language</i><p>I've been watching the coffeescript bandwagon pick up passengers for a while now, but I simply am not convinced that creating a 'language' to simplify or 'improve' another one is a smart thing to do. Maybe on a team that has all Ruby developers this could fly, but now you make it hard to add pure javascript developers to your team without them first getting caught up on your way of doing things.<p>And then to make things even more tedious, you make it compile to original javascript, an interpreted language. It just reminds me of how Rails initially tried to bake ajax into its way of doing things initially (and has since stopped ... but now we have to support that mess). If the top devs in our field are using it, then there's got to be some merit to it ... but I gotta say, it really doesn't seem all that clever to me.
kokey超过 13 年前
I spoke only Afrikaans for the first 6 years of my life. The simplification still affects me when speaking English, mainly the examples mentioned in the article, especially with regards to tenses. I still sometimes make mistakes with 'do/does', 'was/were', etc.
perfunctory超过 13 年前
I like the analogy but I don't think it's correct. CoffeeScript is not a simplified JavaScript. On the contrary. It adds more syntactic and semantic rules.
instakill超过 13 年前
Ek dink nie so nie, boet.
Muzza超过 13 年前
The analogy is good, but there are parts of Afrikaans which are more complex than Dutch. Conjugating an adjective or negating a sentence, for instance. Are there parallels in CoffeeScript?