From d1f65097c48afe6d869949cc5ede76a8b14401a9 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Tue, 14 Feb 2017 15:19:29 +0000 Subject: Fix immutable rules; add some general documentation immutable is still a little weird and not completely what you'd expect. Maybe just not having it is better. --- code/demo.odin | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index 5d2e53636..caee21a05 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -2,16 +2,9 @@ main :: proc() { - { - - x := [...]int{1, 2, 3, 4}; - immutable y := ^x; - fmt.println(y^[0]); - } - /* /* - Version 0.1.0 + Version 0.1.1 Added: * Dynamic Arrays `[...]Type` @@ -24,10 +17,11 @@ main :: proc() { * Entities prefixes with an underscore do not get exported on imports * Overloaded `free` for pointers, slices, strings, dynamic arrays, and dynamic maps * enum types have an implict `names` field, a []string of all the names in that enum + * immutable variables are "completely immutable" + * `slice_to_bytes` - convert any slice to a slice of bytes Removed: * Maybe/option types - * immutable variables * Remove `type` keyword and other "reserved" keywords * `compile_assert` and `assert`return the value of the condition for semantic reasons -- cgit v1.2.3