diff options
author | NickPapanastasiou <nickpap9411@gmail.com> | 2015-06-10 12:21:11 -0400 |
---|---|---|
committer | NickPapanastasiou <nickpap9411@gmail.com> | 2015-06-10 12:21:11 -0400 |
commit | cd207d1590897b9d410eb7e91992a6b11d36cd50 (patch) | |
tree | 7a992d9f4aad2c0bf907c8d6ded1314ae6770007 | |
parent | e5fa463b3477813bb11d590beaf7ed8b49e9c733 (diff) |
So much D
-rw-r--r-- | d.html.markdown | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/d.html.markdown b/d.html.markdown index f547cc56..d816a312 100644 --- a/d.html.markdown +++ b/d.html.markdown @@ -6,7 +6,7 @@ contributors: lang: en --- -If you're like me and spend way to much time on the internet, odds are you've heard +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, multi-paradigm language with fantastic support for OOP, functional programming, metaprogramming, and easy concurrency and parallelism, and runs the gamut from low-level features such as @@ -113,10 +113,13 @@ void swap(T)(ref T a, ref T b) { } // With templates, we can also parameterize on values, not just types -class Matrix(T = int, uint m, uint n) { +class Matrix(uint m, uint n, T = int) { T[m] rows; T[n] columns; } + +auto mat = new Matrix!(3, 3); + ``` Speaking of classes, let's talk about properties for a second. A property |