- native utf-8 (mutable vector strings, immutable slices for statics)
- namespaces/modules
- implicit memory management (like rust), or explicit with optional garbage collection (full GC, or leak/use-after-free checker)
- explicit move/copy/borrow semantics
- generics
- native map/list/vector support (like clojure)
- native iterator support (like linq)
- structs/enums/tagged unions
- rust style function signatures, incl. explicit self parameter
- functions return tuples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
Stopwatch sw = new Stopwatch(); | |
int count; | |
IEnumerable<int> vals; | |
int k = 1000000; | |
for (int loops = 0; loops < 6; loops++) | |
{ | |
Console.WriteLine($"Run {loops}"); |
Or, ramblings and complaints about the general state of programming and other possibly related grievances.
There are 3 primary ways to pass data into functions: move, copy, or borrow (aka a reference). Since mutability is inherently intertwined with data passing (this function can borrow my data, but only if they promise not to mess with it), we end up with 6 distinct combinations.
Every language has its own level of support and take on these semantics:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
/* | |
* 1) open `about:support`, and open profile folder | |
* 2) create folder `chrome` | |
* 3) place this file inside using the filename `userChrome.css` | |
*/ | |
#TabsToolbar { | |
visibility: collapse !important; |
The only goal of this style guide is the collective improvement of our professional craft as software engineers.
This style guide is not about enforcing consistency, unless that consistency provides some tangible benefit to the professional craft. It is also not about absolutes, or rules that “shall not be broken.” As such, this style guide contains only guidelines.