summaryrefslogtreecommitdiffhomepage
path: root/de-de
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2014-08-21 10:08:56 -0500
committerLevi Bostian <levi.bostian@gmail.com>2014-08-21 10:08:56 -0500
commit4c4e52356c11168b30e0bc9938f2ec1c62252485 (patch)
treec4e335e3c510e233c7d4528f69e05ed7a9672b21 /de-de
parent1828ef068dd224a8402a4c786569de985f3793b2 (diff)
parent98ce82761f135f8e4dbabeb84e53fde44822f0d3 (diff)
Merge pull request #721 from m90/master
[coffeescript/de] Add german version of coffeescript introduction
Diffstat (limited to 'de-de')
-rw-r--r--de-de/coffeescript-de.html.markdown106
1 files changed, 106 insertions, 0 deletions
diff --git a/de-de/coffeescript-de.html.markdown b/de-de/coffeescript-de.html.markdown
new file mode 100644
index 00000000..98a452ba
--- /dev/null
+++ b/de-de/coffeescript-de.html.markdown
@@ -0,0 +1,106 @@
+---
+language: coffeescript
+contributors:
+ - ["Tenor Biel", "http://github.com/L8D"]
+ - ["Xavier Yao", "http://github.com/xavieryao"]
+translators:
+ - ["Frederik Ring", "https://github.com/m90"]
+ - ["Philipp Fischbeck", "https://github.com/PFischbeck"]
+filename: coffeescript-de.coffee
+lang: de-de
+---
+
+CoffeeScript ist eine kleine Sprache, die eins zu eins nach JavaScript übersetzt wird - es findet keine Interpretation zur Laufzeit statt.
+Als Nachfolger von JavaScript konzipiert, gibt CoffeeScript sein Bestes, lesbaren, gut formatierten und sauber laufenden JavaScript-Code zu erzeugen, der in jeder JavaScript-Laufzeit einwandfrei funktioniert.
+
+Auf [der CoffeeScript Website](http://coffeescript.org/) gibt es ein ausführliches Tutorial.
+
+``` coffeescript
+# CoffeeScript ist eine dieser Sprachen für "Hipster"
+# und folgt daher vielen Trends und Einflüssen aus modernen Sprachen.
+# Kommentare werden daher wie in Ruby und Python mit Hashes gekennzeichnet
+
+###
+Kommentarblöcke sehen aus wie diese und werden direkt nach '/ *'s und '* /'s
+im erzeugten JavaScript umgewandelt.
+
+Vorweg: bevor du mit CoffeeScript anfängst, solltest du bereits einen guten
+Überblick über die Sprache JavaScript haben.
+###
+
+# Zuweisung:
+number = 42 #=> var number = 42;
+opposite = true #=> var opposite = true;
+
+# Bedingungen:
+number = -42 if opposite #=> if(opposite) { number = -42; }
+
+# Funktionen:
+square = (x) -> x * x #=> var square = function(x) { return x * x; }
+
+fill = (container, liquid = "Kaffee") ->
+ "#{container} wird mit #{liquid} gefüllt..."
+#=>var fill;
+#
+#fill = function(container, liquid) {
+# if (liquid == null) {
+# liquid = "Kaffee";
+# }
+# return container + " wird mit " + liquid + " gefüllt...";
+#};
+
+# "Ranges":
+list = [1..5] #=> var list = [1, 2, 3, 4, 5];
+
+# Objekte:
+math =
+ root: Math.sqrt
+ square: square
+ cube: (x) -> x * square x
+#=> var math = {
+# "root": Math.sqrt,
+# "square": square,
+# "cube": function(x) { return x * square(x); }
+#}
+
+# "Splats":
+race = (winner, runners...) ->
+ print winner, runners
+#=>race = function() {
+# var runners, winner;
+# winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+# return print(winner, runners);
+#};
+
+# Existenz-Operator:
+alert "Hab ich's nicht gesagt?" if elvis?
+#=> if(typeof elvis !== "undefined" && elvis !== null) { alert("Hab ich's nicht gesagt?"); }
+
+# Listen-Abstraktion:
+cubes = (math.cube num for num in list)
+#=>cubes = (function() {
+# var _i, _len, _results;
+# _results = [];
+# for (_i = 0, _len = list.length; _i < _len; _i++) {
+# num = list[_i];
+# _results.push(math.cube(num));
+# }
+# return _results;
+# })();
+
+foods = ['Brokkoli', 'Spinat', 'Schokolade']
+eat food for food in foods when food isnt 'Schokolade'
+#=>foods = ['Brokkoli', 'Spinat', 'Schokolade'];
+#
+#for (_k = 0, _len2 = foods.length; _k < _len2; _k++) {
+# food = foods[_k];
+# if (food !== 'Schokolade') {
+# eat(food);
+# }
+#}
+```
+
+## Weiterführende Links
+
+- [Smooth CoffeeScript](http://autotelicum.github.io/Smooth-CoffeeScript/)
+- [CoffeeScript Ristretto](https://leanpub.com/coffeescript-ristretto/read)