summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.d.html.markdown.swpbin20480 -> 0 bytes
-rw-r--r--d.html.markdown10
2 files changed, 9 insertions, 1 deletions
diff --git a/.d.html.markdown.swp b/.d.html.markdown.swp
deleted file mode 100644
index 017dbf4e..00000000
--- a/.d.html.markdown.swp
+++ /dev/null
Binary files differ
diff --git a/d.html.markdown b/d.html.markdown
index ee06a425..39c6a4d3 100644
--- a/d.html.markdown
+++ b/d.html.markdown
@@ -16,6 +16,7 @@ import std.stdio;
void main(string[] args) {
writeln("Hello, World!");
}
+```
If you're like me and spend way too much time on the internet, odds are you've heard
about [D](http://dlang.org/). The D programming language is a modern, general-purpose,
@@ -133,6 +134,13 @@ getter and setter methods (`object.setX(7)`)!
```d
// Consider a class parameterized on a types T, U
+
+class MyClass(T, U) {
+ T _data;
+ U _other;
+
+}
+
// And "getter" and "setter" methods like so
class MyClass(T, U) {
T _data;
@@ -212,6 +220,6 @@ Notice how we got to build a nice Haskellian pipeline to compute num?
That's thanks to a D innovation know as Uniform Function Call Syntax.
With UFCS, we can choose whether to write a function call as a method
or free function call! Walter wrote a nice article on this [http://www.drdobbs.com/cpp/uniform-function-call-syntax/232700394](here.) In short, you can call functions whose first parameter
-is of some type A on any expression of type A as a methods.
+is of some type A on any expression of type A as a method.