From a989172605e51968826234d6919239841d5481f7 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Tue, 3 Feb 2015 09:07:13 +0100 Subject: [PATCH] Nimrod -> Nim --- Nim for C programmers.md => Nim-for-C-programmers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename Nim for C programmers.md => Nim-for-C-programmers.md (98%) diff --git a/Nim for C programmers.md b/Nim-for-C-programmers.md similarity index 98% rename from Nim for C programmers.md rename to Nim-for-C-programmers.md index 56e75a0..0021ea4 100644 --- a/Nim for C programmers.md +++ b/Nim-for-C-programmers.md @@ -46,7 +46,7 @@ Exceptions | No (Yes w/C++) | Yes ### Philosophy -The key to understanding Nim is that Nim was designed to be as fast as C, but to be much safer. Many of the design-decisions are based on making it harder to shoot yourself in the foot. For example, in C you are required to use a pointer for most of your everyday programming needs. While Nim does give you pointers, Nim gives you other, safer tools for your everyday needs, while pointers are mostly reserved for interfacing with C and doing low-level system programming. In other words, C gives you a combined hammer and gun, while Nimrod gives you a separate gun and hammer. +The key to understanding Nim is that Nim was designed to be as fast as C, but to be much safer. Many of the design-decisions are based on making it harder to shoot yourself in the foot. For example, in C you are required to use a pointer for most of your everyday programming needs. While Nim does give you pointers, Nim gives you other, safer tools for your everyday needs, while pointers are mostly reserved for interfacing with C and doing low-level system programming. In other words, C gives you a combined hammer and gun, while Nim gives you a separate gun and hammer. The other important thing to know is that while C uses a separate language to do meta-programming (the preprocessor), Nim meta-programming is done with the Nim language itself. That means that most Nim code can be executed at compile time, and Nim's ability to generate Nim-code at compile time is much more sophisticated. @@ -142,7 +142,7 @@ var y2 = 2 let z = 2 -Define variable. y2 uses type inference. z is single-assignment. In nimrod, uninitialized variables is initialized to 0/nil or similar defaults. +Define variable. y2 uses type inference. z is single-assignment. In Nim, uninitialized variables is initialized to 0/nil or similar defaults.