From b488680c1c0f2239d8d29557167bbd5ea2b38884 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Thu, 7 Jun 2018 23:14:25 +0200 Subject: [PATCH] formatting --- hands-on_dlang.md | 172 +++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 85 deletions(-) diff --git a/hands-on_dlang.md b/hands-on_dlang.md index e798c72..ad47ff8 100644 --- a/hands-on_dlang.md +++ b/hands-on_dlang.md @@ -1,90 +1,90 @@ # Hands-On DLang -- [Hands-On DLang](#hands-on-dlang) - - [Setup](#setup) - - [Installing DMD and DUB](#installing-dmd-and-dub) - - [OS X](#os-x) - - [Installing with Homebrew (recommended)](#installing-with-homebrew-recommended) - - [Installing locally using the install script](#installing-locally-using-the-install-script) - - [Installing using the installer](#installing-using-the-installer) - - [Windows](#windows) - - [Recommended editor setup](#recommended-editor-setup) - - [Installation of Visual Studio Code](#installation-of-visual-studio-code) - - [Extension setup](#extension-setup) - - [Project setup and compiling](#project-setup-and-compiling) - - [Without DUB](#without-dub) - - [With DUB](#with-dub) - - [Basics](#basics) - - [Hello World](#hello-world) - - [Imports and modules](#imports-and-modules) - - [Selective imports](#selective-imports) - - [Scoped imports](#scoped-imports) - - [Imports match files and directories](#imports-match-files-and-directories) - - [Basic Types](#basic-types) - - [Type conversion](#type-conversion) - - [Type properties](#type-properties) - - [Indexing](#indexing) - - [Variable declarations](#variable-declarations) - - [Mutability](#mutability) - - [`immutable`](#immutable) - - [`const`](#const) - - [Functions](#functions) - - [Return type deduction](#return-type-deduction) - - [Default arguments](#default-arguments) - - [Local functions](#local-functions) - - [Memory and pointers](#memory-and-pointers) - - [Memory safety](#memory-safety) - - [Structs](#structs) - - [Member functions](#member-functions) - - [`const` member functions](#const-member-functions) - - [`static` member functions](#static-member-functions) - - [Arrays](#arrays) - - [Static arrays](#static-arrays) - - [Dynamic arrays](#dynamic-arrays) - - [Array operations and properties](#array-operations-and-properties) - - [Slices](#slices) - - [Alias and `string`s](#alias-and-strings) - - [Control flow](#control-flow) - - [if…else](#ifelse) - - [switch…case](#switchcase) - - [Old fashioned loops](#old-fashioned-loops) - - [Breaking out of outer loops](#breaking-out-of-outer-loops) - - [`foreach` loops](#foreach-loops) - - [Element iteration](#element-iteration) - - [Access by reference](#access-by-reference) - - [Iterate `n` times](#iterate-n-times) - - [Iteration with index counter](#iteration-with-index-counter) - - [Ranges](#ranges) - - [Laziness](#laziness) - - [Copying ranges](#copying-ranges) - - [`RandomAccessRange`s](#randomaccessranges) - - [Lazy range algorithms](#lazy-range-algorithms) - - [Associative arrays](#associative-arrays) - - [Classes](#classes) - - [Inheritance](#inheritance) - - [Final and abstract member functions](#final-and-abstract-member-functions) - - [Checking for identity](#checking-for-identity) - - [Interfaces](#interfaces) - - [Templates](#templates) - - [Template functions](#template-functions) - - [Other templates](#other-templates) - - [Template value parameters](#template-value-parameters) - - [Other template parameters](#other-template-parameters) - - [Delegates](#delegates) - - [Functions as arguments](#functions-as-arguments) - - [Local functions with context](#local-functions-with-context) - - [Anonymous functions and lambdas](#anonymous-functions-and-lambdas) - - [Exceptions](#exceptions) - - [`nothrow`](#nothrow) - - [Gems](#gems) - - [Uniform function call syntax (UFCS)](#uniform-function-call-syntax-ufcs) - - [Scope guards](#scope-guards) - - [Range algorithms](#range-algorithms) - - [Unittesting](#unittesting) - - [Example](#example) - - [Executing unittests](#executing-unittests) - - [Code coverage](#code-coverage) - - [String mixins](#string-mixins) +* [Hands-On DLang](#hands-on-dlang) + * [Setup](#setup) + * [Installing DMD and DUB](#installing-dmd-and-dub) + * [OS X](#os-x) + * [Installing with Homebrew (recommended)](#installing-with-homebrew-recommended) + * [Installing locally using the install script](#installing-locally-using-the-install-script) + * [Installing using the installer](#installing-using-the-installer) + * [Windows](#windows) + * [Recommended editor setup](#recommended-editor-setup) + * [Installation of Visual Studio Code](#installation-of-visual-studio-code) + * [Extension setup](#extension-setup) + * [Project setup and compiling](#project-setup-and-compiling) + * [Without DUB](#without-dub) + * [With DUB](#with-dub) + * [Basics](#basics) + * [Hello World](#hello-world) + * [Imports and modules](#imports-and-modules) + * [Selective imports](#selective-imports) + * [Scoped imports](#scoped-imports) + * [Imports match files and directories](#imports-match-files-and-directories) + * [Basic Types](#basic-types) + * [Type conversion](#type-conversion) + * [Type properties](#type-properties) + * [Indexing](#indexing) + * [Variable declarations](#variable-declarations) + * [Mutability](#mutability) + * [`immutable`](#immutable) + * [`const`](#const) + * [Functions](#functions) + * [Return type deduction](#return-type-deduction) + * [Default arguments](#default-arguments) + * [Local functions](#local-functions) + * [Memory and pointers](#memory-and-pointers) + * [Memory safety](#memory-safety) + * [Structs](#structs) + * [Member functions](#member-functions) + * [`const` member functions](#const-member-functions) + * [`static` member functions](#static-member-functions) + * [Arrays](#arrays) + * [Static arrays](#static-arrays) + * [Dynamic arrays](#dynamic-arrays) + * [Array operations and properties](#array-operations-and-properties) + * [Slices](#slices) + * [Alias and `string`s](#alias-and-strings) + * [Control flow](#control-flow) + * [if…else](#ifelse) + * [switch…case](#switchcase) + * [Old fashioned loops](#old-fashioned-loops) + * [Breaking out of outer loops](#breaking-out-of-outer-loops) + * [`foreach` loops](#foreach-loops) + * [Element iteration](#element-iteration) + * [Access by reference](#access-by-reference) + * [Iterate `n` times](#iterate-n-times) + * [Iteration with index counter](#iteration-with-index-counter) + * [Ranges](#ranges) + * [Laziness](#laziness) + * [Copying ranges](#copying-ranges) + * [`RandomAccessRange`s](#randomaccessranges) + * [Lazy range algorithms](#lazy-range-algorithms) + * [Associative arrays](#associative-arrays) + * [Classes](#classes) + * [Inheritance](#inheritance) + * [Final and abstract member functions](#final-and-abstract-member-functions) + * [Checking for identity](#checking-for-identity) + * [Interfaces](#interfaces) + * [Templates](#templates) + * [Template functions](#template-functions) + * [Other templates](#other-templates) + * [Template value parameters](#template-value-parameters) + * [Other template parameters](#other-template-parameters) + * [Delegates](#delegates) + * [Functions as arguments](#functions-as-arguments) + * [Local functions with context](#local-functions-with-context) + * [Anonymous functions and lambdas](#anonymous-functions-and-lambdas) + * [Exceptions](#exceptions) + * [`nothrow`](#nothrow) + * [Gems](#gems) + * [Uniform function call syntax (UFCS)](#uniform-function-call-syntax-ufcs) + * [Scope guards](#scope-guards) + * [Range algorithms](#range-algorithms) + * [Unittesting](#unittesting) + * [Example](#example) + * [Executing unittests](#executing-unittests) + * [Code coverage](#code-coverage) + * [String mixins](#string-mixins) ## Setup @@ -140,10 +140,12 @@ brew cask install visual-studio-code #### Extension setup * Open the Extension view in the sidebar: + | Operating system | Shortcut | | ---------------- | --------- | | OS X | ⌘ + ⇧ + X | | Windows | ⌃ + ⇧ + X | + * Install the extension “D Programming Language (code-d)” (requires that git is installed). * Restart Visual Studio Code.