changelog for the upcoming V 0.1.19
parent
f61b14584a
commit
6c6cbe0821
169
CHANGELOG.md
169
CHANGELOG.md
|
@ -1,41 +1,62 @@
|
||||||
|
## V 0.1.19
|
||||||
|
*XX Aug 2019*
|
||||||
|
|
||||||
|
- New `mysql` module.
|
||||||
|
- Better error format that is supported by all major editors (go to error).
|
||||||
|
- Raw json fields via the `[raw]` attribute.
|
||||||
|
- `import const` was removed from the language.
|
||||||
|
- All C code was removed from the `freetype` module.
|
||||||
|
- `[typedef] attribute for imported C struct typedefs.
|
||||||
|
- Support of Objective C interfaces (primarily for using Cocoa).
|
||||||
|
- REPL: clear command and custom functions.
|
||||||
|
- Syntax bug fixed: `foo[0] += 10` is now possible.
|
||||||
|
- http: support plain HTTP protocol and follow redirects.
|
||||||
|
- net: basic UDP support.
|
||||||
|
- Functions can now be inlined via the `[inline]` attribute.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.18
|
## V 0.1.18
|
||||||
*16 Aug 2019*
|
*16 Aug 2019*
|
||||||
|
|
||||||
- Built-in ORM (`uk_customers = db.select from Customer where country == 'uk' && nr_orders > 0`)
|
- Built-in ORM (`uk_customers = db.select from Customer where country == 'uk' && nr_orders > 0`)
|
||||||
- Map initialization syntax: `m := { ‘foo’: ‘bar’, ‘baz’: ‘foo’ }`
|
- Map initialization syntax: `m := { ‘foo’: ‘bar’, ‘baz’: ‘foo’ }`
|
||||||
- `map.delete(key)`.
|
- `map.delete(key)`.
|
||||||
- `libcurl` dependency was removed from the `http` module.
|
- `libcurl` dependency was removed from the `http` module.
|
||||||
- All function arguments are now immutable by default (previously they could be
|
- All function arguments are now immutable by default (previously they could be
|
||||||
modifed inside the function).
|
modifed inside the function).
|
||||||
- `http` functions now return optionals.
|
- `http` functions now return optionals.
|
||||||
- `sync.WaitGroup`.
|
- `sync.WaitGroup`.
|
||||||
- `vweb` static files serving.
|
- `vweb` static files serving.
|
||||||
- `crypto.rand` module.
|
- `crypto.rand` module.
|
||||||
- `v up` to update V.
|
- `v up` to update V.
|
||||||
- SChannel support on Windows.
|
- SChannel support on Windows.
|
||||||
- `net.urllib` module.
|
- `net.urllib` module.
|
||||||
- vpm package manager, `v install`.
|
- vpm package manager, `v install`.
|
||||||
- `()` are now required in complex bool expressions: `(a && b) || c` instead of `a && b || c
|
- `()` are now required in complex bool expressions: `(a && b) || c` instead of `a && b || c
|
||||||
- All arrays now have a default `.str()` method.
|
- All arrays now have a default `.str()` method.
|
||||||
- Bootstrapping V with MSVC.
|
- Bootstrapping V with MSVC.
|
||||||
- Experimental `≠` etc support.
|
- Experimental `≠` etc support.
|
||||||
- `encoding.csv` module.
|
- `encoding.csv` module.
|
||||||
- `$if debug {` for running code in debug mode only.
|
- `$if debug {` for running code in debug mode only.
|
||||||
- Map struct fields are now initialized automatically, just like arrays.
|
- Map struct fields are now initialized automatically, just like arrays.
|
||||||
- Maps now support array values.
|
- Maps now support array values.
|
||||||
- `json` functions can no longer be used if the `json` module is not imported.
|
- `json` functions can no longer be used if the `json` module is not imported.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.17
|
|
||||||
*29 Jul 2019*
|
## V 0.1.17
|
||||||
- `vweb` module for developing web apps in V.
|
*29 Jul 2019*
|
||||||
- vtalk, open source V forum software.
|
- `vweb` module for developing web apps in V.
|
||||||
- Generics (very limited right now, but they will be gradually improved).
|
- vtalk, open source V forum software.
|
||||||
- Comptime codegen (`foo.$method()` where `method` is a string).
|
- Generics (very limited right now, but they will be gradually improved).
|
||||||
- @ for escaping keywords (e.g. `struct Foo { @type string }`).
|
- Comptime codegen (`foo.$method()` where `method` is a string).
|
||||||
- Windows Unicode fixes (V can now work with non-ASCII paths etc on Windows).
|
- @ for escaping keywords (e.g. `struct Foo { @type string }`).
|
||||||
- Fix mutable args bugs + don't allow primitive arguments to be modified.
|
- Windows Unicode fixes (V can now work with non-ASCII paths etc on Windows).
|
||||||
|
- Fix mutable args bugs + don't allow primitive arguments to be modified.
|
||||||
- Declaring a mutable variable and never modifying it results in a compilation error.
|
- Declaring a mutable variable and never modifying it results in a compilation error.
|
||||||
- Interactive debugging support.
|
- Interactive debugging support.
|
||||||
- `sync` module for Windows.
|
- `sync` module for Windows.
|
||||||
|
@ -48,53 +69,53 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.16
|
## V 0.1.16
|
||||||
*23 Jul 2019*
|
*23 Jul 2019*
|
||||||
- V can now be used with Visual Studio!
|
- V can now be used with Visual Studio!
|
||||||
- Hot code reloading now works with graphical applications (e.g. graph.v, bounce.v).
|
- Hot code reloading now works with graphical applications (e.g. graph.v, bounce.v).
|
||||||
- Compile time memory management for arrays.
|
- Compile time memory management for arrays.
|
||||||
- High order functions.
|
- High order functions.
|
||||||
- `match` expression (replacing `switch`).
|
- `match` expression (replacing `switch`).
|
||||||
- Import cycle detection.
|
- Import cycle detection.
|
||||||
- `crypto/md5`, `crypto/sha256`, and `crypro/sha512` modules.
|
- `crypto/md5`, `crypto/sha256`, and `crypro/sha512` modules.
|
||||||
- `os.executable()` - a cross platform function that returns full path to current executable.
|
- `os.executable()` - a cross platform function that returns full path to current executable.
|
||||||
- `~/.vlang` and `VROOT` were removed entirely. The installation is a lot cleaner now.
|
- `~/.vlang` and `VROOT` were removed entirely. The installation is a lot cleaner now.
|
||||||
- V can now be packaged for all Linux distros.
|
- V can now be packaged for all Linux distros.
|
||||||
- Arch Linux package.
|
- Arch Linux package.
|
||||||
- `string(bytes_buffer, len)`, `string(bytes_array)` casts.
|
- `string(bytes_buffer, len)`, `string(bytes_array)` casts.
|
||||||
- Multiple `defer`s.
|
- Multiple `defer`s.
|
||||||
- `key in map` syntax (replacing `map.exists(key)`).
|
- `key in map` syntax (replacing `map.exists(key)`).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.15
|
## V 0.1.15
|
||||||
*15 Jul 2019*
|
*15 Jul 2019*
|
||||||
- FreeBSD, OpenBSD, NetBSD, DragonFly support.
|
- FreeBSD, OpenBSD, NetBSD, DragonFly support.
|
||||||
- Hot code reloading now works with graphical applications: [bounce.v](https://github.com/vlang/v/blob/master/examples/hot_code_reloading/bounce.v)
|
- Hot code reloading now works with graphical applications: [bounce.v](https://github.com/vlang/v/blob/master/examples/hot_code_reloading/bounce.v)
|
||||||
- VROOT was removed, the installation process is now much simpler.
|
- VROOT was removed, the installation process is now much simpler.
|
||||||
- `defer` statement.
|
- `defer` statement.
|
||||||
- map.v was re-written. It's now much faster.
|
- map.v was re-written. It's now much faster.
|
||||||
- `for key, val in map` syntax.
|
- `for key, val in map` syntax.
|
||||||
- `flag` module for parsing command line arguments.
|
- `flag` module for parsing command line arguments.
|
||||||
- `zip` module.
|
- `zip` module.
|
||||||
- `crypto/sha1` module.
|
- `crypto/sha1` module.
|
||||||
- Submodules and module aliases (`import encoding.base64 as b64`).
|
- Submodules and module aliases (`import encoding.base64 as b64`).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.14
|
## V 0.1.14
|
||||||
*12 Jul 2019*
|
*12 Jul 2019*
|
||||||
- `gg` module Windows support, V Tetris runs on Windows.
|
- `gg` module Windows support, V Tetris runs on Windows.
|
||||||
- `glad` and `cJSON` are now compiled only once, this makes compilation of programs using `gg` and `json
|
- `glad` and `cJSON` are now compiled only once, this makes compilation of programs using `gg` and `json
|
||||||
a bit faster.
|
a bit faster.
|
||||||
- `v.c` has been cleaned up and minimized (~16k => ~10k lines of code).
|
- `v.c` has been cleaned up and minimized (~16k => ~10k lines of code).
|
||||||
- `type` aliases can now have methods.
|
- `type` aliases can now have methods.
|
||||||
- Const overflow check during compilation (`byte(1000)` will no longer compile)
|
- Const overflow check during compilation (`byte(1000)` will no longer compile)
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.13
|
## V 0.1.13
|
||||||
*10 Jul 2019*
|
*10 Jul 2019*
|
||||||
- New enum syntax (`token == .name`), enum values are no longer global consts.
|
- New enum syntax (`token == .name`), enum values are no longer global consts.
|
||||||
- Submodules (`import encoding.base64`).
|
- Submodules (`import encoding.base64`).
|
||||||
- Hot code reloading.
|
- Hot code reloading.
|
||||||
|
@ -107,17 +128,17 @@
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.12
|
## V 0.1.12
|
||||||
*4 Jul 2019*
|
*4 Jul 2019*
|
||||||
- V can finally compile itself on Windows. (https://github.com/vlang/v#mingw-w64)
|
- V can finally compile itself on Windows. (https://github.com/vlang/v#mingw-w64)
|
||||||
- `os` module now uses optionals in all functions that return `File`. Lots of bugs with optionals fixed.
|
- `os` module now uses optionals in all functions that return `File`. Lots of bugs with optionals fixed.
|
||||||
- `println` was optimized. It no longer results in allocations. Now it also works correctly with all integer types.
|
- `println` was optimized. It no longer results in allocations. Now it also works correctly with all integer types.
|
||||||
- Lots of `vfmt` fixes, it will be enabled tomorrow.
|
- Lots of `vfmt` fixes, it will be enabled tomorrow.
|
||||||
- New `strings` module.
|
- New `strings` module.
|
||||||
- Lots of other fixes and improvements, thanks to all the contributors.
|
- Lots of other fixes and improvements, thanks to all the contributors.
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.11
|
## V 0.1.11
|
||||||
*1 Jul 2019*
|
*1 Jul 2019*
|
||||||
- Cross compilation for Windows!
|
- Cross compilation for Windows!
|
||||||
- Lots of Windows fixes
|
- Lots of Windows fixes
|
||||||
- socket.v
|
- socket.v
|
||||||
|
@ -125,20 +146,20 @@
|
||||||
|
|
||||||
|
|
||||||
## 0.1.9 - 0.1.10
|
## 0.1.9 - 0.1.10
|
||||||
*29 Jun 2019*
|
*29 Jun 2019*
|
||||||
- Windows support via MinGW-w64. Pre-built Windows binary.
|
- Windows support via MinGW-w64. Pre-built Windows binary.
|
||||||
- File structure has been simplified: all vlib modules were moved to the vlib/ directory,
|
- File structure has been simplified: all vlib modules were moved to the vlib/ directory,
|
||||||
makefile was moved to the root.
|
makefile was moved to the root.
|
||||||
- One single archive with pre-built binaries for all operating systems.
|
- One single archive with pre-built binaries for all operating systems.
|
||||||
- `mut var := val` was fixed (previously `mut var = val` was allowed as well).
|
- `mut var := val` was fixed (previously `mut var = val` was allowed as well).
|
||||||
|
|
||||||
## 0.1.8
|
## 0.1.8
|
||||||
*28 Jun 2019*
|
*28 Jun 2019*
|
||||||
- Single file programs without `fn main` now work as expected.
|
- Single file programs without `fn main` now work as expected.
|
||||||
- REPL has been fixed: it now supports imports, consts, function definitions, etc.
|
- REPL has been fixed: it now supports imports, consts, function definitions, etc.
|
||||||
|
|
||||||
## 0.1.7
|
## 0.1.7
|
||||||
*27 Jun 2019*
|
*27 Jun 2019*
|
||||||
- All C code in the compiler and vlib has been replaced with V.
|
- All C code in the compiler and vlib has been replaced with V.
|
||||||
- `#` syntax for embedding C code has been removed.
|
- `#` syntax for embedding C code has been removed.
|
||||||
- Exported functions now need to be marked with `pub`, all public vlib functions have been updated.
|
- Exported functions now need to be marked with `pub`, all public vlib functions have been updated.
|
||||||
|
|
|
@ -13,7 +13,6 @@ CommonCHeaders = '
|
||||||
|
|
||||||
#define STRUCT_DEFAULT_VALUE {}
|
#define STRUCT_DEFAULT_VALUE {}
|
||||||
#define EMPTY_STRUCT_DECLARATION
|
#define EMPTY_STRUCT_DECLARATION
|
||||||
#define EMPTY_STRUCT_INIT 0
|
|
||||||
#define OPTION_CAST(x) (x)
|
#define OPTION_CAST(x) (x)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -36,8 +35,6 @@ CommonCHeaders = '
|
||||||
#define STRUCT_DEFAULT_VALUE {0}
|
#define STRUCT_DEFAULT_VALUE {0}
|
||||||
#undef EMPTY_STRUCT_DECLARATION
|
#undef EMPTY_STRUCT_DECLARATION
|
||||||
#define EMPTY_STRUCT_DECLARATION void *____dummy_variable;
|
#define EMPTY_STRUCT_DECLARATION void *____dummy_variable;
|
||||||
#undef EMPTY_STRUCT_INIT
|
|
||||||
#define EMPTY_STRUCT_INIT 0
|
|
||||||
#undef OPTION_CAST
|
#undef OPTION_CAST
|
||||||
#define OPTION_CAST(x)
|
#define OPTION_CAST(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2774,10 +2774,10 @@ fn (p mut Parser) array_init() string {
|
||||||
}
|
}
|
||||||
p.gen(' })')
|
p.gen(' })')
|
||||||
// p.gen('$new_arr($vals.len, $vals.len, sizeof($typ), ($typ[]) $c_arr );')
|
// p.gen('$new_arr($vals.len, $vals.len, sizeof($typ), ($typ[]) $c_arr );')
|
||||||
// TODO why need !first_pass()?? Otherwise it goes to the very top of the out.c file
|
// Need to do this in the second pass, otherwise it goes to the very top of the out.c file
|
||||||
if !p.first_pass() {
|
if !p.first_pass() {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) {EMPTY_STRUCT_INIT ')
|
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) { 0 ')
|
||||||
} else {
|
} else {
|
||||||
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) { ')
|
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) { ')
|
||||||
}
|
}
|
||||||
|
@ -2926,11 +2926,9 @@ fn (p mut Parser) struct_init(typ string, is_c_struct_init bool) string {
|
||||||
}
|
}
|
||||||
did_gen_something = true
|
did_gen_something = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if !did_gen_something {
|
if !did_gen_something {
|
||||||
p.gen('EMPTY_STRUCT_INIT')
|
p.gen('0')
|
||||||
}
|
}
|
||||||
|
|
||||||
p.gen('}')
|
p.gen('}')
|
||||||
if ptr {
|
if ptr {
|
||||||
p.gen(')')
|
p.gen(')')
|
||||||
|
|
Loading…
Reference in New Issue