2023-05-07 20:55:18 +03:00
## V 0.3.5
*not yet released*
2023-05-22 09:36:31 +03:00
- A new VPM site: vpm.vlang.io. A better design, discoverability of packages, descriptions, most downloaded packages etc.
2023-05-07 20:55:18 +03:00
- Struct fields can now be skipped during JSON/ORM serialization via `[json:'-']` and `[sql:'-']` ,
in addition to `[skip]` . This allows having custom behavior for different serialization methods.
- ORM: fixed a foreign key bug that could result in an extra insert.
- Generic functions as function parameters are now supported: `fn f[T](x T, i int, f_ Fn[T]) T { ` .
2023-05-18 12:31:53 +03:00
- Enum values now can have attributes.
2023-05-14 12:57:31 +03:00
- json: Enum value string serialization supports `[json:'alias']` to change its string values.
2023-05-18 12:31:53 +03:00
- Functions can now return fixed size arrays.
2023-05-18 13:24:00 +03:00
- The builtin websocket library is now thread safe.
2023-05-22 09:36:31 +03:00
- Enhanced builtin csrf protection in vweb.
2023-05-25 18:27:49 +03:00
- builtin: heap usage API (gc_memory_use() and gc_heap_usage())
2023-05-07 20:55:18 +03:00
2023-04-29 22:37:27 +03:00
## V 0.3.4
2023-05-04 21:24:13 +03:00
2023-05-01 00:58:10 +03:00
*30 Apr 2023*
2023-05-04 12:59:46 +03:00
### Breaking Changes
2023-05-04 21:24:13 +03:00
The following changes may break compilation of existing code or change behavior at runtime:
- `json` : enums are serialized as strings by default, `[json_as_number]` attribute can be used for
the old behavior.
2023-05-04 12:59:46 +03:00
2023-05-04 21:24:13 +03:00
If you are serializing enums to JSON in your application, then you will need to add the
2023-05-04 12:59:46 +03:00
`[json_as_number]` attribute to keep the old behavior!
2023-05-04 21:24:13 +03:00
- Variable shadowing has been completely banned (previously variable names could conflict with
module names).
### Web
- vweb now supports live page reloading.
The web app is instantly updated in the browser (no need to refresh the page)
every time a ** .v** or a ** .html** file is changed.
- vweb is now significantly faster and more stable under load, due to a new multithreaded worker
pool, which is much more efficient at spreading the workload among all threads equally.
- vweb now supports middleware.
- vweb now supports controllers.
It's now possible to have multiple app structs to better separate logic.
- vweb now supports overridable `.not_found()` method for custom 404 pages in vweb.
- vweb now uses database pool.
- Fixed multipart form parsing in vweb.
### Backends
- A new pure WASM backend, based on binaryen, a WASM `builtin` module, and a pure V WASM
serialization library.
- Lots of fixes and new features in the native backend, including making codegen logic
platform independent.
- Now code generated by the С backend, can be compiled by a C++20 compiler.
- C backend does not generate unused interface functions now.
### Compiler CLI
2023-05-04 12:59:46 +03:00
2023-04-29 22:37:27 +03:00
- `v share file.v` for sharing code via the playground.
2023-05-04 21:24:13 +03:00
- `v up` speed up for when it hasn't been run for a long time (**vc/** bootstrapping has been
optimized).
2023-04-30 22:57:10 +03:00
- `v init` no longer overwrites existing `src/main.v` .
2023-05-04 21:24:13 +03:00
- `v self` now uses a faster TCC backend on macOS (Intel/Apple Silicon), just like on Windows/Linux.
- A new command line flag `-e` for running short V programs on command line: `v -e "println(2+5)"` (
works just like in Perl).
2023-04-30 22:57:10 +03:00
- A new `-ldflags` option, in addition to `-cflags` . Works just like LDFLAGS in C.
2023-05-04 21:24:13 +03:00
### ORM
- All ORM queries now return `![]` (`Result` of an array).
This allows handling/propagating DB errors and simplifies working with ORM (one way).
- Many ORM improvements: type checks for `limit/offset/order by/where` ; support of reference objects
in `insert` ; struct fields can be used with `limit/offset` ; `Connection` interface.
- ORM now supports the `like` operator:
```v
users := sql db {
select from User where name like 'Bob%'
}
```
- A new `-d trace_orm` option to see all SQL queries generated and used by V ORM and
`-d trace_pg_error` to trace PG errors.
### Standard Library
- Added new `termios` module.
- `net.ssl` : types using ssl contexts can now be converted to strings via `.str()` /printed
via `println()` .
- `v.reflection` : added type symbol info metadata.
- `crypto` and `math` modules have been updated to use `Result` instead of `Option` .
- `datatypes.LinkedList[map]` now works correctly.
2023-04-30 22:57:10 +03:00
- `urllib.Values.get()` now returns an Option.
2023-05-04 21:24:13 +03:00
- `strconv` : `v_printf()` was made private, `v_sprintf()` was deprecated. String interpolation
should be used instead.
2023-05-01 00:58:10 +03:00
- `net.http` : mime types have been updated to include all official types.
- `gg` : `create_image()` now returns `!Image` instead of `Image` , allowing to handle errors.
2023-05-04 21:24:13 +03:00
- `sokol` : errors during image creation no longer result in a panic, but can be handled by the
programmer.
- `sokol` : macOS apps can now be quit using **Cmd+Q** .
- `os.hostname()` and `os.loginname()` now return `Result` .
2023-05-01 00:58:10 +03:00
- `strconv.atoi` optimizations.
- `println()` now supports arrays with recursive references.
2023-05-04 21:24:13 +03:00
- `termux` : support for cross-compilation from termux to other platforms.
- `readline` module now works much better on macOS: key navigation, history, etc (now on par with
Linux).
- `os` : fixed a memleak in `getline()` .
- `os.Process` now has a `create_no_window` option (Windows only).
- `os.Process` now has a `set_work_folder()` method to set the initial working folder of the new
child process.
### Option as a first class type
Final steps in making the Option type a first class type:
- If guards now work with struct fields which are `Option` functions.
Such fields can now also be assigned to other fields/variables.
- Option receivers can no longer have methods.
- `none` can now be cast to all `Option` types, including aliases.
- Option references are now supported: `?&Type` .
- Arrays of `Option` s are now allowed.
- Allow `foo := Foo{}` , when `Foo` has an Option field, that is a struct, that has a `[required]`
tag on its fields.
### Compile-time Reflection
- Compile-time interface fields evaluation.
- Compile-time enum evaluation:
```v
$for item in MyEnum.fields {
println(item.value)
println(item.name)
}
```
- Added `$option` as a compile-time reflection type representing an any Option type.
- All special compile-time reflection types are now lowercase (`$int`, `$enum` , `$option` , etc).
### Checker Improvements/Fixes
- Enums can no longer be initialized like structs.
- Capture variables can no longer shadow anonymous function params.
- Mixing multi-return results with other types in return statements is no longer allowed.
2023-05-01 00:58:10 +03:00
- Assigning anonymous structs to named structs is no longer allowed.
2023-05-04 21:24:13 +03:00
- `[required]` fields are now checked for embedded structs.
- Fixed a bug with closures with fixed array variables.
- Builtin methods `first/last/repeat` can now be used in custom user types (previously they only
worked in builtin arrays).
- Generic struct initialization no longer needs explicit types to be provided:
```v
struct Foo[T, U] {
a T
b U
}
2023-05-18 12:31:53 +03:00
2023-05-04 21:24:13 +03:00
foo := Foo{
a: 2
b: 'x'
}
2023-05-18 12:31:53 +03:00
2023-05-04 21:24:13 +03:00
println(foo)
```
- unsafe: dereferencing nil references is no longer allowed in the following case:
```v
a := unsafe { nil }
println(*a)
```
### OSes
- Added basic QNX support.
### Other changes
2023-05-01 00:58:10 +03:00
2023-05-04 21:24:13 +03:00
- Lots of documentation/readme improvements.
- Lots of playground improvements: [play.vlang.io ](https://play.vlang.io ), including a really cool
feature: "Show generated C code".
- A new `[spawn_stack: 131072]` function attribute for controlling the max size of the stack of the
spawned threads.
- Channel pop now works with an `or` block: `ch := <-self.item or { return none }`
- `it` has been renamed to `index` in array inits.
- "Is V still fast?" web-page has been sped up by splitting the result table into multiple years.
### Development
- GitHub Copilot summaries in PRs.
2023-05-01 00:58:10 +03:00
2022-11-05 09:08:01 +03:00
## V 0.3.3
2023-01-30 20:20:47 +03:00
*30 Jan 2023*
2023-01-31 16:17:38 +03:00
- String interpolation simplified to just '${name}', enforced by vfmt, and updated in the entire code base.
- `[]` is now used for generics instead of `<>` .
- Various ORM fixes and improvements, including string interpolation support, type checks, fn calls in `where` .
2023-01-23 12:05:34 +03:00
- Accessing a pointer map value requires an `or {}` block outside `unsafe` .
2023-01-30 23:44:18 +03:00
- `math.vec` module for generic vector math including 2D, 3D, and 4D vector operations.
2022-11-05 12:13:05 +03:00
- `go foo()` has been replaced with `spawn foo()` (launches an OS thread, `go` will be used for
upcoming coroutines instead).
2023-01-30 20:20:47 +03:00
- vfmt now supports `// vfmt off` and `// vfmt on` for turning off the formatting locally for short snippets of code.
Useful for keeping your carefully arranged matrices intact.
- fast.vlang.io fixes & improvements, new server.
- New official IntelliJ plugin: https://intellij-v.github.io.
- Lots of fixes in the type checker.
2023-01-16 00:19:16 +03:00
- Match branch range expressions with consts: `match x { const1...const2 {} }`
2023-01-30 20:20:47 +03:00
- Builtin stb_image.h used by gg has been updated to the latest v2.28.
2023-01-30 23:44:18 +03:00
- Lots of new language documentation, a nicer table of contents.
- Improved documentation for most of the vlib modules
2023-01-30 20:20:47 +03:00
- All of vlib has been updated to use separate Option/Result types.
- To avoid confusion, all references in the code and documentation to `Optional` have been replaced with `Option` .
2023-01-31 16:17:38 +03:00
- `gg.Context` pipeline has more effects, including the `additive` effect.
2023-01-30 20:20:47 +03:00
- Hot code reloading via `[live]` is now supported in imported modules, not just the main module.
- VFS support in the builtin `sqlite` module; `sqlite.get_affected_rows_count()` .
- `make.bat` & `v up` improvements on Windows.
- Syntax sugar for map inits without needing explicit casts for interfaces: `all.children := { "abc": rect, "def": ui.rectangle()}` .
- `$embed_file()` fixes, including variable args support.
- `none` fixes: no longer allowed to be used as a separate type, `dump()` support, not allowed inside `unsafe` .
- Much cleaner eof checks in `os` : refactor `err == IError(os.Eof{})` to `err is os.Eof` .
- Const functions: `const y = term.yellow` , then `println(y('abc'))` .
- Lots of work on `x.json2` , the pure V json encoder, soon to become official.
2023-01-31 16:17:38 +03:00
- Improved compile time checks, like `$if x is Type {` ; `$if T in [$Array, $Struct, $Alias, $Function] {` .
2023-01-30 23:44:18 +03:00
- New `v.reflection` module for runtime reflection.
2023-01-31 16:17:38 +03:00
- Improved `os.mv()` , which now works consistently even across different windows drives/mount points.
- `string.trim_indent()` , useful with multi line strings, that start/end with new lines and indentation.
2023-01-30 23:44:18 +03:00
- Reduced memory consumption in the `crypto` modules.
- Installation instructions for using V on NixOS.
- TeamCity test runner support via `v -test-runner teamcity foo_test.v` .
- Better `make` support for OpenBSD.
2023-01-31 16:17:38 +03:00
- Much improved experience for `v install pcre` on Windows (it now bundles its own .c files, so it compiles cleanly, even if the platform does not have another pcre package installed).
2023-01-30 23:44:18 +03:00
- Improved vweb stability under load.
- Improved `pg` compatibility with older PostgreSQL versions before 2014.
2023-01-31 16:17:38 +03:00
- Native backend: operator support for floats, multi return.
- V can now be compiled with tcc on latest macOS and Apple Silicon.
- CI optimizations for faster runs.
- Official V UI library is now licensed under MIT.
- Deprecated `math.util` and `math.mathutil` have been removed.
- Builtin type names can no longer be used as identifiers.
- Generic `typeof[T]()` , `sizeof[T]()` , `isreftype[T]()` functions.
- New official AdventOfCode repo with AOC solutions, also added to CI.
- New time format support: `time.format_rfc3339()` .
- `encoding.html.escape()` .
- Deprecated `-error-limit` in favour of the documented `-message-limit` option.
- Maps now support aliased keys.
- Operator overloading now works with reference types.
- Generic struct inits with nested generic structs and generic optional types are now allowed.
- During array creation, `len:` is required when using default values for the array.
- Optimized one byte `[]u8` arrays creation.
- Int signedness mismatch is now checked: `cannot use literal signed integer as u8` .
- New comptime features for fields: `field.is_<field>` , `field.is_alias` , `field.is_enum` .
- More detailed timings in `v -show-timings` .
- `$for in` works with alias types.
- `v new <name> web` for quickly scaffolding new web projects.
- All public functions in the `hash` and `encoding.base32` modules have been documented.
- Recursive aliasing is no longer allowed (e.g. `type Alias = map[string]Alias` ).
- `sqlite` , `pg` , `mysql` have been moved to `db.sqlite` , `db.pg` , `db.mysql` .
- New `crypto.pem` module.
- New `map.reserve()` method.
2023-01-30 20:20:47 +03:00
2022-11-05 12:13:05 +03:00
2022-09-24 02:13:10 +03:00
## V 0.3.2
2022-11-01 05:41:13 +03:00
*31 Oct 2022*
2022-11-02 10:08:21 +03:00
- New simplified string interpolation: `println("Hello, {name}!")` . It will be the only way, old syntax (`${name}` and `$name` )
will be deprecated.
2022-11-02 12:50:16 +03:00
- New stunning playground with an improved look and feel, a much better and more responsive editor,
2022-10-26 02:34:54 +03:00
code sharing by link, more convenient keyboard control, reusability for potential embedding:
https://play.vlang.io.
2022-11-02 10:08:21 +03:00
- `net.ssl` has been migrated from a dynamically linked OpenSSL to a statically linked Mbed TLS. This means that V binaries will no
longer have an OpenSSL dependency. OpenSSL can still be enabled via `-d use_openssl` .
2022-11-02 12:50:16 +03:00
- msgpack module for decoding/encoding msgpack. (`v install msgpack`)
2022-10-26 02:34:54 +03:00
- Easier custom error creation: `return MyCustomErr{}` instead of `return IError(MyCustomErr)` .
2022-11-02 10:08:21 +03:00
- Lots of native backend improvements, including library calls, comptime conditionals, enums, method definitions/calls, structs.
- Removed the need for the `[console]` attribute in Windows GUI apps.
2022-10-17 15:41:07 +03:00
- All floats outputs now have `.0` conditionally appended to them to improve clarity.
2022-11-02 10:08:21 +03:00
- Improved type checker: lots of new type checks and fixed checker bugs.
- Custom integer enum types: `enum Xyz as u64 {` .
- Some further interpreter work.
- Improved call tracing via `-trace-calls` .
- Most of vlib has been updated to use the new Option/Result types.
- Lots of documentation improvements, including a better documentation of the recent Option/Result split.
- net, net.http, vweb bugs and fixes.
- V REPL: Home/End keys support. Lots of clean up.
- QuadTree and RingBuffer types in `datatypes` .
- Forward iterator for `datatypes.LinkedList<T>` , forward and backward iterators for `datatypes.DoublyLinkedList<T>` .
- More precise WINAPI declarations for easier integration on Windows.
- Unused last expression in `if` is now checked.
- AST transformer fixes and optimizations.
- cgen cleanups.
- Lots of fixes in the builtin `dump()` function.
- Stylistic improvements and bug fixes in vfmt.
- Casting integers to enums now requires `unsafe{}` .
- Improved error and warning messages.
- A new `maps` module, similar to existing `arrays` . It has generic `filter` , `flatten` , `invert` , `to_map` , `to_array` , `from_array`
functions.
- Parallel compilation now uses `sync.Pool` .
- `utf8.is_number()` , `utf8.is_space()` functions.
- New `encoding.base32` module.
- `-skip-unused` fixes, soon to be made the default.
2023-02-16 12:43:39 +03:00
- `gg.TouchPoint` to differentiate between different types of touch input.
2022-11-02 10:08:21 +03:00
- Anonymous structs visibility issues fixed.
- orm: support parenthesized expressions like `select from User where (name == 'Sam' && is_customer == true) || id == 1` .
- `vweb.csrf` module.
- `str.int()` conversion speedup (without -prod).
- More CI tests on FreeBSD.
2022-10-26 02:34:54 +03:00
2022-07-03 15:13:08 +03:00
## V 0.3.1
2022-08-31 19:24:45 +03:00
*31 Aug 2022*
2022-07-06 21:38:40 +03:00
- Anonymous structs.
2022-08-31 19:24:45 +03:00
- Lots of bug fixes: 90% of all bugs ever submitted are closed.
- Major improvements to the fast native backend including linking support on Linux. The goal is to be able to self host V soon.
- Parallelized cc step. Speeds up -prod and clang/gcc compilation by 300-500% (depending on
2022-09-01 09:26:05 +03:00
the number of cores). Experimental and hidden behind a -parallel-cc flag, soon to be the default.
2022-08-31 19:24:45 +03:00
- New keyword/type: `nil` . Only to be used inside `unsafe` . Replaces `voidptr(0)` .
2022-07-03 15:13:08 +03:00
- V can now find code in the `src/` directory. This allows making V repos much cleaner.
2022-08-31 19:24:45 +03:00
- Intel C compiler support.
- Older macOS support (< 10.12 ).
2022-07-28 14:16:33 +03:00
- `os.mkdir()` now has an optional `mode` parameter.
2022-08-31 19:24:45 +03:00
- Full termux support via `$if termux {` , more predictable logging on Android.
2022-07-03 15:13:08 +03:00
- Go backend fixes.
2022-07-06 21:38:40 +03:00
- More type checks.
- DOOM is now translated/compiled and launched on CI servers. A screenshot of the running game
is made via `vgret` and is compared to the expected result.
- VLS performance improvements, especially on Windows.
2022-08-30 13:18:22 +03:00
- `v ls` tool for installing, for updating, and for launching VLS (V Language Server).
2022-08-03 01:14:01 +03:00
- Support `assert condition, extra_message` , where the `extra_message` will be evaluated and shown if the assertion fails.
2022-08-30 13:18:22 +03:00
- Anonymous sumtypes have been removed (deprecated for now) due to complicating the language and the compiler too much.
2022-08-31 19:24:45 +03:00
- `encoding.csv` is now generic, supports bools, accepts a custom delimiter, and is compatible with io.Reader/io.Writer.
- Operator overloading now works with aliases and generics.
- `datatypes` module now uses operator overloading.
- All `datatypes` types can be converted to V arrays.
- `smtp` improvements including multiple recipients and base64/utf8 support.
- `v doc` now has syntax highlighting.
- `arrays.carray_to_varray<T>()` for converting C arrays to V arrays.
- `strconv.v_sprintf()` has been deprecated in favor of string interpolation.
- TOML module now supports `[toml:...]` attributes, just like the JSON module.
- `os.walk()` is no longer recursive (still works the same).
- Windows code has been removed from `v.c` distributed on non-Windows systems. (`v_windows.c` is used on Windows.)
- ORM functions now return `Result` , so the errors can be handled.
- `#preinclude` for low level C interop.
- `net.urllib` ipv6 support.
- Lots of fixes in `shared` types.
- `io` has been migrated to `Result` .
- Third party window control in Sokol.
- Scanner optimizations.
- `string.replace_char()` , `math.round_sig()` .
- Improved multiplication performance in `math.big` .
- `net.Http.Response.text` renamed to `body` .
- Using C's #define is no longer allowed in normal V code, only in `.c.v` files.
- V interpreter improvements.
- `net.websocket` timeout is now configurable.
2022-07-03 15:13:08 +03:00
2022-06-30 10:41:09 +03:00
## V 0.3
*30 Jun 2022*
- C to V translation via C2V: `v translate file.c` . (Demo video: [Translating DOOM from C to V, building it in under a second and running it! ](https://www.youtube.com/watch?v=6oXrz3oRoEg ))
- Lots of bug fixes in V, cgen, and C interop to allow running translated DOOM.v.
- Programs built with the V compiler no longer leak memory by default.
- Closures. All operating systems are supported. ([Demo](https://twitter.com/v_language/status/1528710491882852352))
- `Option` and `Result` are now separate types: `?Foo` and `!Foo` respectively. Old code will continue working for 1 year and will result in a warning/hint.
- Hundreds of new checks in the type checker.
- All V's backends have been split up into separate processes. As the result, building V got 26% faster.
2023-01-09 09:36:45 +03:00
- Maps and arrays can now return options: `m[bad_key] or { ... }` , `if x := arr[key] { ... }` .
2022-06-30 10:41:09 +03:00
- `ustring` has been replaced with `[]rune` (works just like in Go).
- Maps can now have non-string keys.
- A new compiler pass for transforming the AST (doesn't slow the compiler too much, adds about 25ms to `v self` ). It eliminates unreachable branches and performs other simple optimizations and transformations.
- C backend is now parallel (just the cgen part for now).
- Lots of compiler source code clean up and minor optimizations. The compiler got ~30% faster according to fast.vlang.io.
- Better compiler source code organization (absolutely necessary as it's surpassed 100k loc).
- The naming of V's integer types is now more consistent: `byte` has been renamed to `u8` . Old code will continue working for 1 year and will result in a warning/hint.
- The typo detector now highlights the suggested name so that it's more visible.
- `datatypes` module now has `Heap, Queue, Stack, BSTree, LinkedList` .
- Interfaces can now be embedded (like structs).
- vlib now has a TOML parser, fully compatible with TOML 1.0.
- Lots of work done on the V.js backend, including the graphics library, which has been ported to V.js.
- JS promises, await (V.js).
- It's now possible to do more complex array initialization by using each individual element of the array (`[]int{init: it}`).
- Unsigned right shift operators `>>>` and `>>>=` have been added to V. (They work exactly like in Java.)
- `-nofloat` option, which is useful for writing kernels and for embedded systems without an FPU (used in Vinix).
- Generic interfaces.
- TCC is now bundled with the language, this allows building V programs without an external C compiler dependency.
- Null can be used in `unsafe` only (for example, for C interop).
2023-02-16 12:43:39 +03:00
- Pointer arithmetic and comparing pointers to numbers is now also only allowed in `unsafe` .
2022-06-30 10:41:09 +03:00
- Inline sumtypes.
- New module `compress.gzip` .
- Lots of `net` /`net.http`/`vweb` fixes (also used for the upcoming Gitly launch).
- IPv6 support.
- `net.http` headers are now enum fields instead of strings. This allows to avoid typos and offers autocomplete.
- Struct field deprecation.
- Static GC (no longer a dynamic lib dependency).
- New various algorithms for random number generation: MT19937RNG, etc (module `rand` ).
- Fix immutability bugs that allowed to bypass compiler immutability checks and modify const/immutable values.
2022-07-03 15:13:08 +03:00
- Lots of fixes in the JSON serializer.
2022-06-30 10:41:09 +03:00
- Heap allocated only structs marked with `[heap]` .
- Significantly improve lots of error messages, make them more clear, suggest hints.
- Bug fixes and new features in the pure V `regex` module.
- Lots of new drawing functions in the graphics module (like `gg.draw_polygon_filled(), gg.draw_arc_empty()` etc)
- Builtin FPS display in `gg` .
- Latest Sokol backend in `gg` .
- Advanced CI tests for the graphics module. Graphical apps are run on GitHub Actions instances, their output is saved to an image, uploaded, and compared to the expected result.
- More bug fixes in generics.
- Bug fixes in aliases. They can now fully replace the types they alias.
2022-07-04 15:34:00 +03:00
- `[minify]` struct attribute for struct minification.
2022-06-30 10:41:09 +03:00
- `for in` now works with fixed arrays.
- The parser was made a bit faster by skipping `vfmt` code when not in `vfmt` mode (by using `-d vfmt` ).
- Lots of vfmt improvements, especially with comments.
- Experimental `#[index]` syntax for negative indexing (like in Python, but needs special syntax instead of being used by default).
- Visibility bug fixes in modules (`pub`).
- Error propagation in complex expressions (e.g. `foo(bar()?)` ).
- Optionals can now by used in consts (`const x := opt() or {}`).
- Lots of new documentation, including vlib modules documentation and the official V Documentation.
- vpm improvements (including a new vpm mirror).
- `sync` improvements including `sync.thread_id()` , `sync.Once` ..
- V can now be used to generate object files (`foo.o`) that can be used in existing C projects.
- `-usecache` and `-skip-unused` fixes, they are close to being on by default.
- Lots of Windows issues fixed.
- Amazon Linux support.
- Fixes in shared maps and arrays.
- `term.ui` improvements, including multi byte/UTF-8 events.
- New `crypto` modules, including `crypto.des, crypto.cipher, crypto.blowfish` .
- Comptime fixes.
- 4 byte bool option (`-d 4bytebool`) for compatibility with some C software.
- `strconv` (pure V formatting module used in string interpolation) fixes and performance improvements.
- ORM fixes (pg, mysql, sqlite). Tables are now created automatically based on the V structs, no more need in sql files to create tables for apps.
- `volatile` keyword.
- `"stringliteral".len` optimization (replaced by the actual number by the new `transform` pass).
- Lots of inline assembler improvements (it's used a lot in Vinix).
- Many new functions in the `math` module.
- Separators in number literals: `1_000_000` .
- `strings.Builder` optimizations and new methods.
- Autofree fixes (still not production ready, hidden behind the `-autofree` flag).
- Lots of Android fixes in V and in vab.
2022-07-03 15:13:08 +03:00
- Lots of commits to the native backend (amd64/arm64).
2022-06-30 10:41:09 +03:00
- V interpreter fixes. (Still at an early stage.)
- Go2V translator has been started by the community, and can already translate simple programs.
- An early version of the Go backend (`v -b go -o file.go file.v`).
2022-06-30 19:51:22 +03:00
## V 0.2.4
2022-06-30 10:41:09 +03:00
*30 Aug 2021*
2022-03-09 13:14:54 +03:00
- Introduce `isize` and `usize` types, deprecate `size_t` in favor of `usize` .
- Add `datatypes` and `datatypes.fsm` modules.
2022-05-09 08:18:26 +03:00
- Add `compile_error` and `compile_warn` comptime functions.
2021-09-05 18:46:14 +03:00
- Bare metal support. Vinix OS kernel is now being developed in V.
- Builtin web framework vweb is now multithreaded, all CPU cores are used.
2021-05-28 17:59:26 +03:00
- String interpolation and struct stringers are now implemented in pure V
with a much cleaner and faster implementation. Previously libc's `sprintf`
was used.
2021-04-23 15:10:14 +03:00
- Improved `unused variable` warning. Assigning to a variable no longer marks it as used.
2022-06-30 10:41:09 +03:00
*... lots of missing changelog for this version, sorry (will update a bit later)*
2021-01-22 12:33:06 +03:00
2021-01-24 12:54:27 +03:00
## V 0.2.2 - 0.2.3
2021-01-22 12:33:06 +03:00
*22 Jan 2021*
2021-01-24 12:54:27 +03:00
- Allow interfaces to define fields, not just methods.
2020-12-31 19:31:17 +03:00
- `vweb` now uses struct embedding: `app.vweb.text('hello') => app.text('hello')` .
2020-12-30 04:20:03 +03:00
- Consts can now be declared outside of `const()` blocks: `const x = 0` .
2021-01-10 13:24:46 +03:00
- Overloading of `>` , `<` , `!=` , `==` , `<=` and `>=` operators.
2021-01-05 21:34:42 +03:00
- New struct updating syntax: `User{ ...u, name: 'new' }` to replace `{ u | name: 'new' }` .
2021-01-23 12:25:40 +03:00
- `byte.str()` has been fixed and works like all other numbers. `byte.ascii_str()` has been added.
2021-01-08 06:57:02 +03:00
- Smart cast in for loops: `for mut x is string {}` .
- `[noinit]` struct attribute to disallow direct struct initialization with `Foo{}` .
2021-01-10 00:48:23 +03:00
- Array decompose: `[1, 2, 3]...` is now `...[1, 2, 3]`
2021-01-10 13:26:31 +03:00
- Treating `enum` as `int` and operations on `enum` except `==` and `!=` are removed for strict type checking.
2021-01-08 19:41:52 +03:00
- Support `[manualfree] fn f1(){}` and `[manualfree] module m1` , for functions doing their own memory management.
2021-01-12 06:38:12 +03:00
- Allow usage of `<` and `>` operators for struct in `.sort` method for arrays, i.e. `arr.sort(a < b)` .
2021-01-13 05:31:14 +03:00
- Auto generate assignment operators like `+=` , `-=` , `*=` , `/=` and `%=` if the operators are defined.
2021-01-14 19:00:08 +03:00
- Colorize and improve failing tests output.
- Fix `go` with a generic function: `go test<string>(c, 'abcd')` .
2021-01-14 19:19:04 +03:00
- Add comptime `x := $embed_file('v.png') println(x.len) println(ptr_str(x.data()))` , for embedding files into binaries.
2021-01-18 08:04:59 +03:00
- Advanced vdoc search on mobile layout.
2021-01-22 12:33:06 +03:00
- string's `left()` /`right` were removed in favor of slicing syntax: `str[..pos]` .
- gg: native graphics mode on macOS/iOS (using Cocoa Drawing API).
2021-01-31 15:57:06 +03:00
- Full path to consts must be specified everywhere. This makes it easy to distinguish them
from local variables.
- `__offsetof` for low level needs (works like `offsetof` in C).
- vfmt now preserves empty lines, like gofmt.
2021-02-03 17:18:38 +03:00
- Support for compile time environment variables via `$env('ENV_VAR')` .
- Allow method declaration of `==` and `<` operators and auto generate `!=` , `>` , `<=` and `>=` .
2021-03-06 20:16:04 +03:00
- support `dump(expr)` , i.e. tracing of both the location, name and value of an expression
2021-03-08 21:52:13 +03:00
- deprecate os.exec in favour of os.executable() which does *NOT* return an option, when the command was not found
2020-12-30 04:20:03 +03:00
## V 0.2.1
2021-01-05 21:34:42 +03:00
*30 Dec 2020*
2020-12-30 04:20:03 +03:00
- Hashmap bootstrapping fixes.
- Array decomposition to varargs: `fn sum(i ...int) int` => `a := [2,3,4] println(sum(a...))`
- HTML module docs generated by vdoc now have global search.
2020-12-22 22:48:26 +03:00
## V 0.2
*22 Dec 2020*
2022-06-30 10:41:09 +03:00
- Compile-time memory management via `-autofree` (not production ready yet). [Video demonstration ](https://www.youtube.com/watch?v=gmB8ea8uLsM ).
2020-12-22 22:48:26 +03:00
- Channels and locks.
- Thread safe typed arrays via keyword `shared` .
- Struct embedding.
2022-06-30 10:41:09 +03:00
- IO streams (`io.Reader`, `io.Writer` etc).
2020-12-22 22:48:26 +03:00
- A powerful websocket module that conforms to RFC 6455 and passes the Autobahn test suite (498 client tests and 249 server tests).
2020-12-22 23:39:18 +03:00
- The `net` module is now non blocking and is more feature complete providing similar API to Go.
2020-12-22 22:48:26 +03:00
- V's graphics module now uses Metal/DirectX/OpenGL instead of just OpenGL.
- V can now run in the browser via WASM and execute V code by translating it to JavaScript:
https://v-wasm.now.sh
- V binaries for Linux/Windows/macOS are now built and deployed automatically via GitHub Actions.
- Smart casting for sumtypes and interfaces, including complex expressions: `if x.expr is int { println(x.expr + 1) }` .
- Clean and easy way to sort arrays: `users.sort(a.name > b.name)` .
- A huge amount of `vfmt` fixes and improvements. It has now reached a point where it can be safely used on any V source file.
2020-12-22 23:01:54 +03:00
- A new CI job that runs `v fmt -verify` on the entire code base, a new command that makes sure the file/directory
2020-12-22 22:48:26 +03:00
has been vfmt'ed. This ensures that all code submitted to the V project is formatted.
- A new tool `v vet` for analyzing the project and finding potential bugs and errors.
2020-12-22 23:01:54 +03:00
- A new `term.ui` module for building dynamic terminal UIs with an example editor written in it.
2020-12-22 22:48:26 +03:00
- Early iOS and Android support.
- All missing ORM features from the old backend were brought back.
- Magic `it` variable has been replaced with smart casts (the change is completely handled by vfmt).
- Cross-compiling to Windows and Linux brought back.
2020-12-22 23:01:54 +03:00
- C2V can now generate wrappers. Example: https://github.com/medvednikov/libsodium. (C2V will be released by 0.3)
2020-12-22 22:48:26 +03:00
- C++ compiler support: code, generated by the C backend can now by compiled by C++ compilers.
- Short generics syntax: `foo(5)` instead of `foo<int>(5)` .
- Cached modules via `-usecache` . Faster compilation due to not needing to rebuild the entire vlib for
each program. Will be enabled by default in 0.2.1.
- New improved sum types implementation.
- Lots of errors that happen often during the development cycle were turned into warnings to increase
development speed. They are still errors in production builds.
- Labeled `break` and `continue` .
- Lots of documentation. The official language documentation grew 3 times in size.
- `modules.vlang.io` is now generated automatically on every commit.
2020-12-22 12:44:42 +03:00
- Builtin compile-time JSON serializer now supports `time.Time` .
2020-12-22 23:01:54 +03:00
- Fixes in type aliases, to make them behave just like the types they alias.
2020-12-22 12:44:42 +03:00
- `array.contains(element)` is now generic.
2020-12-22 23:01:54 +03:00
- Lots of improvements in the JS backend and its type system.
2020-12-22 22:48:26 +03:00
- Simpler and more constinent function arg syntax: `foo(a int, b int, c string)` instead of `foo(a, b int, c string)`
- Lots of fixes and optimizations in the hashmap.
- Lots of missing checks in the type checker were added (for example, checking the correct usage of public struct fields).
- Mutability bug fixes
- Taking the address of a map value is no longer allowed, like in Go.
- Matrix multiplication.
2020-12-22 23:19:05 +03:00
- A new `#pkgconfig` flag to provide platform independent way to get compilation flags for C libraries/packages.
2020-12-22 23:01:54 +03:00
- Explicit parentheses requirement in complex boolean expressions.
2020-12-22 22:48:26 +03:00
- `println` was made even smarter, and can now handle complex types.
- Precompiled text templates can now be used outside of vweb via `$tmpl()` .
- Gitly, a big web application written in vweb has been released: https://github.com/vlang/gitly
- `['/:arg1/:arg2/action']` vweb action attribute for easily getting query parameters assigned to method arguments.
- Improved performance of text rendering, `gg.text_width()` .
- Webview module in V UI.
- Binary enum flags.
- `[export]` attribute to change exported function name (for example for calling from a C library).
2020-12-22 23:01:54 +03:00
- `unsafe` fixes and improvements.
2020-12-22 23:19:05 +03:00
- Improvements to rand: `rand.ulid()` , `rand.uuid()` , a unified customizable PRNG API.
2020-12-22 22:48:26 +03:00
- Hundreds of other fixes, features, and tests (from now on the changelog will be updated
right away as the feature/bug fix lands).
2020-11-28 06:42:27 +03:00
2020-05-06 03:22:57 +03:00
## V 0.1.27
*5 May 2020*
2020-05-06 03:26:43 +03:00
2020-11-28 06:42:27 +03:00
- vfmt has been re-written from scratch using the new AST parser.
2020-10-20 21:14:56 +03:00
It's much faster, cleaner, and can format
2020-05-06 03:22:57 +03:00
files with compilation errors.
2020-05-06 03:26:43 +03:00
- `strconv` , `sprintf` , and `printf` in native V, without any libc calls.
2020-05-06 03:22:57 +03:00
- Interfaces are now a lot more stable and have all expected features.
- Lots of x64 backend improvements: function calls, if expressions, for loops, local variables.
- `map()` and `filter()` methods can now be chained.
- New `[]int{cap:cap, len:len}` syntax for initializing array length and capacity.
- New `is` keyword for checking the type of sum types and interfaces.
- `as` can now be used to cast interfaces and sum types.
2020-10-20 21:14:56 +03:00
- Profiling with `-profile` . Prints a nice table with details about every single function call:
number of calls, average time per call, total time per function
2020-05-06 03:22:57 +03:00
- `import(xxx)` syntax has been removed in favor of `import xxx` for simplicity and greppability.
- Lots of fixes and improvements in the type checker.
- `time.StopWatch`
- `dl` module for dynamic loading.
2020-10-20 21:14:56 +03:00
- Automatic `str()` method generation for every single type, including all arrays.
2020-05-06 03:22:57 +03:00
- Short struct initialization syntax for imitating named function args: `foo(bar:0, baz:1)` .
- New operator `!in` .
- Performance improvements in critical parts of the builtin data structures (array, map).
- High order functions improvements (functions can now be returned etc).
- Anonymous functions that can be defined inside other functions.
- Built-in JSON module is back.
- Lots and lots of new tests added, including output tests that test error messages.
- Multiple errors are now printed, the compiler no longer stops after the first error.
2020-05-10 17:24:43 +03:00
- The new JS backend using the AST parser (almost complete).
2020-05-06 03:22:57 +03:00
- Variadic functions.
- `net.websocket` module (early stage).
- `vlib` is now memory leak free, lots of `autofree` improvements.
- Simplified and cleaned up `cmd/v` , `v.builder` .
2020-05-06 03:26:43 +03:00
- V UI was updated to work with the new backend.
2020-05-06 03:22:57 +03:00
2020-05-02 16:57:26 +03:00
## V 0.1.25
*1 Apr 2020*
2020-05-06 03:26:43 +03:00
2020-11-28 06:42:27 +03:00
- The entire compiler has been re-written with an AST parser.
The code is now a lot cleaner and more maintainable.
2020-10-20 21:14:56 +03:00
~15k lines of old compiler code were removed.
2020-05-02 16:57:26 +03:00
2019-12-31 22:49:11 +03:00
## V 0.1.24
*31 Dec 2019*
2019-11-30 16:49:42 +03:00
2020-11-28 06:42:27 +03:00
- A new parser/generator built on top of an AST that simplifies code greatly
2020-10-20 21:14:56 +03:00
and allows to implement new backends much faster.
2019-12-31 22:49:11 +03:00
- Sum types (`type Expr = IfExpr | MatchExpr | IntegerLiteral`).
- B-tree map (sped up the V compiler by ~10%).
- `v fmt -w` .
2019-12-31 22:54:31 +03:00
- The entire code base has been formatted with vfmt.
2019-12-31 22:49:11 +03:00
- Generic structs.
- SDL module.
- Arrays of pointers.
- os: `is_link()` , `is_dir()` , `exists()` .
- Ranging through fixed size arrays.
- Lots of fixes in ORM and vweb.
2021-03-04 16:24:07 +03:00
- The first tutorial: [building a simple web application with vweb ](https://github.com/vlang/v/blob/master/tutorials/building_a_simple_web_blog_with_vweb/README.md )
2019-12-31 22:49:11 +03:00
- Match expressions now must be exhaustive.
- freestanding: `malloc()` /`free()`.
- `++` is now required instead of `+= 1` for consistency.
- Interpolated strings now allow function calls: `println('val = $get_val()')` .
- `string.replace_each([])` for an efficient replacement of multiple values.
- More utf8 helper functions.
- `-prealloc` option for block allocations.
- `type` aliases.
- Running `v` with an unknown command will result in an error.
- `atof` implementation in pure V.
- Enums can now have negative values.
- New `filepath` module.
- `math.factorial` .
- `ftp` module.
- New syntax for casting: `val as Type` .
2019-12-31 22:56:04 +03:00
- Fewer libc functions used (soon V will have no dependency on libc).
2019-12-31 22:49:11 +03:00
## V 0.1.23
*30 Nov 2019*
2020-10-20 21:14:56 +03:00
- [Direct x64 machine code generation ](https://github.com/vlang/v/issues/2849 ).
Hello world being built in 3 milliseconds.
- Bare metal support via the `-freestanding` flag, to build programs without linking to libc.
2019-11-30 16:55:31 +03:00
- Prebuilt V packages for Linux, macOS, and Windows.
- `string.index()` now returns `?int` instead of `int/-1` .
- Lots of fixes in Generics.
2019-11-30 16:49:42 +03:00
- vweb framework for developing web applications is back.
2020-10-20 21:14:56 +03:00
- Vorum, the forum/blogging software written in vweb, can now be compiled and has been added to CI.
2019-11-30 16:49:42 +03:00
- REPL, `v up` have been split up into separate applications to keep the core V compiler small.
- V now enforces short enum syntax (`.green` instead of `Color.green` ) when it's enough.
- V UI for macOS.
- Interfaces have been rewritten. `[]interface` support.
2023-02-16 12:43:39 +03:00
- `os.cp()` for copying files and directories.
2019-11-30 16:49:42 +03:00
- Additional compile-time flags: `$if clang, msvc, mingw, x32, x64, big_endian, little_endian {` .
- All C functions now have to be declared, all missing C functions have been defined.
2021-04-28 07:44:28 +03:00
- Global variables (only with the `-enable-globals` flag)
2020-10-20 21:14:56 +03:00
for low level applications like kernels and drivers.
2020-02-21 16:17:27 +03:00
- Nothing can be cast to bool (previously code like `if bool(1) {` worked).
2019-11-30 16:49:42 +03:00
- `<<` and `>>` now work with all integer types.
2020-02-21 16:17:27 +03:00
- V detects Cygwin and shows an error (V supports Windows natively).
2019-11-30 16:49:42 +03:00
- Improved type checking of some operators (`%, |, & ` etc).
- Windows 7 support.
- `println(true)` now prints `true` instead of `1` .
- `os.exec()` now uses `CreateProcess` on Windows.
- fast.vlang.io website for monitoring the performance of V after every commit.
- On Windows Visual Studio is now used automatically if GCC is not installed.
- vfmt!
- Lots of cleaning up in the compiler code.
- Multi-level pointers in unsafe code (`****int`).
- MSVC backtrace.
- `$if os {` blocks are now skipped on a different OS.
- C string literals (`c'hello'`).
- AlpineLinux/musl fixes + added to CI.
- Inline assembly.
- Clipboard module (Windows, macOS, X).
- `foo()?` syntax for error propagation.
- Docs have been migrated from HTML to `doc/docs.md` .
2019-11-30 16:55:31 +03:00
- `eventbus` module.
- Haiku OS support.
- `malloc/free` on bare metal.
- `utf8` helper functions (`to_lower()`, `to_upper()` , etc).
- Optimization of `for c in str {` .
2020-10-20 21:14:56 +03:00
- `string/array.left/right/slice/substr` were removed (use `[a..b]` slicing syntax instead).
2019-11-30 16:55:31 +03:00
2019-11-30 16:49:42 +03:00
2019-10-28 13:12:29 +03:00
## V 0.1.22
*28 Oct 2019*
- Generic functions (`fn foo< T > (bar T) T {`) with varargs support.
- `array[start..end]` and `string[start..end]` slicing syntax.
- Optimized `array.filter()` and `array.map()` .
- `sqlite` module.
- Cached modules for faster compilation.
2020-10-20 21:14:56 +03:00
- Dramatic compilation optimizations: [V now compiles itself in 0.10 - 0.30 seconds ](https://github.com/vlang/v/wiki/The-V-language-now-compiles-itself-in-0.09-seconds )
2019-10-28 13:12:29 +03:00
- V scripts (simpler and cross-platform alternative to Bash).
- Infinite multi-dimensional arrays (`[][][]int`).
- `unsafe` .
- `[deprecated]` attribute.
2020-02-21 16:17:27 +03:00
- `[if]` function attributes for compile time function exclusion for performance.
2019-10-28 13:12:29 +03:00
- `switch` has been completely removed from the language and replaced by
`match` everywhere.
- `pub struct` and `pub const` , previously all structs and consts were public
by default.
- `musl` support (V can now run on, for example, Alpine Linux).
- Module header generation. V now supports closed source modules, which are still
used in some industries.
- Constants were added to typo suggestions.
- `color in [.green, .red, .blue]` now works without specifying `Color.green` .
- V compiler is now a module that can be used by other programs.
- Backtraces now have source lines on Linux.
- `runtime.nr_cpus()` .
- `fn init()` for module initialization.
- `a in [1, 2, 3]` optimization: no array gets allocated.
- Raw strings: `s := r'hello\nworld'` .
2023-01-09 09:36:45 +03:00
- `if a := func() { }` syntax for handling options.
2019-10-28 13:12:29 +03:00
- f32/f64 comparison now uses machine epsilon by default.
2019-09-21 17:42:38 +03:00
## V 0.1.21
2019-09-30 22:39:52 +03:00
*30 Sep 2019*
2019-09-21 17:42:38 +03:00
2023-01-09 09:36:45 +03:00
- `none` keyword for options.
2019-09-30 22:39:52 +03:00
- Solaris support.
2019-09-21 17:42:38 +03:00
- All table lookup functions now use `none` .
2020-02-21 16:17:27 +03:00
- varargs: `fn foo(bar int, params ...string) {` .
2019-09-22 17:24:44 +03:00
- Double quotes (`"`) can now also be used to denote strings.
2019-09-21 17:42:38 +03:00
- GitHub Actions CI in addition to Travis.
- `-compress` option. The V binary built with `-compress` is only ~90 KB!
- More memory management.
2019-09-30 22:39:52 +03:00
- Unused modules result in an error.
- "Unused variable/module" errors are now warnings in non-production builds.
- Duplicate methods with the same name can no longer be defined.
- Struct names must be capitalized, variable/function names must use snake_case.
- Error messages are now even nicer!
- Lots of fixes in automatic `.str()` method generation for structs and arrays.
- ~30% faster parser (files are no longer parsed separately for each pass).
- `_` is no longer a variable, but an actual syntax construct to skip unused values, like in Go.
2019-10-01 00:17:54 +03:00
- Multiple returns (`fn foo() (int, string) {`).
2019-09-30 22:39:52 +03:00
- `!` can now only be used with booleans.
2019-09-21 17:42:38 +03:00
2019-09-17 13:58:21 +03:00
## V 0.1.20
2019-09-17 22:24:53 +03:00
*17 Sep 2019*
2019-09-17 13:58:21 +03:00
- JavaScript backend!
- Hundreds of C warnings were fixed. `gcc v.c` now builds without
any warnings.
- The mutability check now applies to function args (mutable
receivers that are not modified result in a compilation error).
- V tests now show how long each test took.
2019-09-17 22:24:53 +03:00
- Official Android support (only console applications via Termux for now).
2019-09-17 13:58:21 +03:00
- Typo check. If a variable/function/module etc is misspelled,
V will suggest the correct name.
- Lots of Microsoft C fixes, and a separate Travis instance for
this backend.
- Bitwise operators `|` , `^` , `&` no longer work with booleans.
2019-08-23 00:26:59 +03:00
## V 0.1.19
2019-09-12 03:59:24 +03:00
*12 Sep 2019*
2019-08-23 00:26:59 +03:00
2019-09-12 03:59:24 +03:00
- Lots of refactoring, simplifications, and optimizations in the compiler.
- Experimental memory management at compilation (only for the V compiler itself for now).
- Lots of ORM fixes.
- Functions can now be inlined via the `[inline]` attribute.
2019-08-23 00:26:59 +03:00
- New `mysql` module.
- Better error format that is supported by all major editors (go to error).
2019-09-12 03:59:24 +03:00
- Error messages now point to the actual place where the error happened.
- Custom json field names: `struct User { last_name string [json:lastName] }` .
2019-08-23 00:26:59 +03:00
- Raw json fields via the `[raw]` attribute.
- All C code was removed from the `freetype` module.
2019-09-12 03:59:24 +03:00
- `gg` module can now render all Unicode characters.
2019-08-23 03:10:37 +03:00
- `[typedef]` attribute for imported C struct typedefs.
2019-08-23 00:26:59 +03:00
- Support of Objective C interfaces (primarily for using Cocoa).
- REPL: clear command and custom functions.
2019-09-12 03:59:24 +03:00
- REPL tests (which are also used for testing certain compiler errors).
2019-08-23 00:26:59 +03:00
- Syntax bug fixed: `foo[0] += 10` is now possible.
- http: support plain HTTP protocol and follow redirects.
2019-09-12 03:59:24 +03:00
- http: header data is now processed correctly.
2019-08-23 00:26:59 +03:00
- net: basic UDP support.
2019-09-12 03:59:24 +03:00
- `import const` was removed from the language.
- `array.contains()` was removed from the language (`in` should be used instead).
- `[0; len]` syntax was removed (replaced with a simpler `[0].repeat(len)` )
- Primitive aliases were removed to simplify the language.
- GitHub supports V now!
- Backtraces are now printed on panics.
- A new awesome `readline` module.
- V.c is now regenerated automatically after every commit.
- A bug with struct ordering was fixed, now structs can be declared in any order.
- V modules can now be built with `v build module` .
- `@FILE, @LINE, @FN, @COLUMN` for debugging.
2019-08-23 00:26:59 +03:00
2019-08-03 11:26:36 +03:00
## V 0.1.18
2019-08-23 00:26:59 +03:00
*16 Aug 2019*
2020-02-21 16:17:27 +03:00
- Built-in ORM (`uk_customers = db.select from Customer where country == 'uk' && nr_orders > 0`).
- Map initialization syntax: `m := { ‘ foo’ : ‘ bar’ , ‘ baz’ : ‘ foo’ }` .
2019-08-23 00:26:59 +03:00
- `map.delete(key)` .
- `libcurl` dependency was removed from the `http` module.
- All function arguments are now immutable by default (previously they could be
2023-02-16 12:43:39 +03:00
modified inside the function).
2023-01-09 09:36:45 +03:00
- `http` functions now return options.
2019-08-23 00:26:59 +03:00
- `sync.WaitGroup` .
- `vweb` static files serving.
- `crypto.rand` module.
- `v up` to update V.
- SChannel support on Windows.
- `net.urllib` module.
- vpm package manager, `v install` .
2020-02-21 16:17:27 +03:00
- `()` are now required in complex bool expressions: `(a && b) || c` instead of `a && b || c` .
2019-08-23 00:26:59 +03:00
- All arrays now have a default `.str()` method.
- Bootstrapping V with MSVC.
2019-08-17 00:48:04 +03:00
- Experimental `≠` etc support.
2019-08-23 00:26:59 +03:00
- `encoding.csv` module.
- `$if debug {` for running code in debug mode only.
- Map struct fields are now initialized automatically, just like arrays.
- Maps now support array values.
- `json` functions can no longer be used if the `json` module is not imported.
## V 0.1.17
*29 Jul 2019*
- `vweb` module for developing web apps in V.
- vtalk, open source V forum software.
- Generics (very limited right now, but they will be gradually improved).
- Comptime codegen (`foo.$method()` where `method` is a string).
- @ for escaping keywords (e.g. `struct Foo { @type string }` ).
- 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.
2019-07-25 15:13:35 +03:00
- Declaring a mutable variable and never modifying it results in a compilation error.
2019-07-29 19:44:48 +03:00
- Interactive debugging support.
- `sync` module for Windows.
- `#!` support on Unix systems (V scripts).
- Lots of Visual Studio fixes.
- `crypto.aes` and `crypto.rc4` modules.
- Internal modules.
2019-08-23 00:26:59 +03:00
## V 0.1.16
*23 Jul 2019*
- V can now be used with Visual Studio!
- Hot code reloading now works with graphical applications (e.g. graph.v, bounce.v).
- Compile time memory management for arrays.
- High order functions.
- `match` expression (replacing `switch` ).
- Import cycle detection.
2019-07-24 01:44:54 +03:00
- `crypto/md5` , `crypto/sha256` , and `crypro/sha512` modules.
2019-08-23 00:26:59 +03:00
- `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.
- V can now be packaged for all Linux distros.
- Arch Linux package.
- `string(bytes_buffer, len)` , `string(bytes_array)` casts.
- Multiple `defer` s.
- `key in map` syntax (replacing `map.exists(key)` ).
2019-07-16 16:29:27 +03:00
2019-08-23 00:26:59 +03:00
## V 0.1.15
*15 Jul 2019*
- FreeBSD, OpenBSD, NetBSD, DragonFly support.
2020-10-20 21:14:56 +03:00
- Hot reloading now works with graphical applications: [bounce.v ](examples/hot_reload/bounce.v )
2019-08-23 00:26:59 +03:00
- VROOT was removed, the installation process is now much simpler.
2019-07-16 01:03:20 +03:00
- `defer` statement.
2019-07-16 00:56:18 +03:00
- map.v was re-written. It's now much faster.
2019-08-23 00:26:59 +03:00
- `for key, val in map` syntax.
- `flag` module for parsing command line arguments.
- `zip` module.
- `crypto/sha1` module.
- Submodules and module aliases (`import encoding.base64 as b64`).
2019-07-16 00:56:18 +03:00
2019-08-23 00:26:59 +03:00
## V 0.1.14
*12 Jul 2019*
- `gg` module Windows support, V Tetris runs on Windows.
2020-10-20 21:14:56 +03:00
- Compile `glad` and `cJSON` only once. Programs using `gg` or `json` compile a bit faster.
2019-08-23 00:26:59 +03:00
- `v.c` has been cleaned up and minimized (~16k => ~10k lines of code).
- `type` aliases can now have methods.
2020-02-21 16:17:27 +03:00
- Const overflow check during compilation (`byte(1000)` will no longer compile).
2019-07-12 06:23:00 +03:00
2019-07-12 17:11:32 +03:00
## V 0.1.13
2019-08-23 00:26:59 +03:00
*10 Jul 2019*
2019-07-10 10:22:42 +03:00
- New enum syntax (`token == .name`), enum values are no longer global consts.
- Submodules (`import encoding.base64`).
- Hot code reloading.
- Special `err` variable for getting error values.
- Complex numbers.
- `<<` can now append arrays (`numbers << [1, 2, 3]`).
- Lots of Windows fixes (Windows still needs some work).
- Lots of REPL improvements (e.g. `>> 2 + 3` works now, no `println` required).
- The website was made easily translatable, it's now partially available in several languages.
2019-07-10 10:19:30 +03:00
2019-07-12 17:11:32 +03:00
## V 0.1.12
2019-08-23 00:26:59 +03:00
*4 Jul 2019*
2020-02-21 16:17:27 +03:00
- V can finally compile itself on Windows (https://github.com/vlang/v#mingw-w64).
2023-01-09 09:36:45 +03:00
- `os` module now uses options in all functions that return `File` .
- Lots of bugs with options were fixed.
2020-11-28 06:42:27 +03:00
- `println` was optimized. It no longer results in allocations.
2020-10-20 21:14:56 +03:00
Now it also works correctly with all integer types.
2019-08-23 00:26:59 +03:00
- Lots of `vfmt` fixes, it will be enabled tomorrow.
2019-07-04 03:38:28 +03:00
- New `strings` module.
2019-08-23 00:26:59 +03:00
- Lots of other fixes and improvements, thanks to all the contributors.
2019-07-04 03:38:28 +03:00
2019-07-10 10:19:30 +03:00
2019-07-12 17:11:32 +03:00
## V 0.1.11
2019-08-23 00:26:59 +03:00
*1 Jul 2019*
2019-07-04 03:39:14 +03:00
- Cross compilation for Windows!
2020-02-21 16:17:27 +03:00
- Lots of Windows fixes.
- socket.v.
- maps fixed.
2019-07-04 03:39:14 +03:00
2019-06-28 14:49:34 +03:00
2019-08-23 03:10:37 +03:00
## V 0.1.9 - 0.1.10
2019-08-23 00:26:59 +03:00
*29 Jun 2019*
2019-06-29 23:05:02 +03:00
- Windows support via MinGW-w64. Pre-built Windows binary.
- File structure has been simplified: all vlib modules were moved to the vlib/ directory,
makefile was moved to the root.
2019-08-23 00:26:59 +03:00
- One single archive with pre-built binaries for all operating systems.
2019-06-29 23:05:02 +03:00
- `mut var := val` was fixed (previously `mut var = val` was allowed as well).
2020-02-21 16:17:27 +03:00
2019-08-23 03:10:37 +03:00
## V 0.1.8
2019-08-23 00:26:59 +03:00
*28 Jun 2019*
2019-06-28 14:49:34 +03:00
- Single file programs without `fn main` now work as expected.
2019-06-29 19:05:57 +03:00
- REPL has been fixed: it now supports imports, consts, function definitions, etc.
2019-06-28 14:49:34 +03:00
2020-02-21 16:17:27 +03:00
2019-08-23 03:10:37 +03:00
## V 0.1.7
2019-08-23 00:26:59 +03:00
*27 Jun 2019*
2019-06-27 23:48:46 +03:00
- All C code in the compiler and vlib has been replaced with V.
2019-06-28 00:41:13 +03:00
- `#` syntax for embedding C code has been removed.
2019-06-27 23:48:46 +03:00
- Exported functions now need to be marked with `pub` , all public vlib functions have been updated.
- CI has been set up (Travis + Azure). On every commit and PR it is made sure that V
can compile itself, all tests pass, and all examples compile.
- More tests have been uploaded.
- Cleaner bytes to string conversion: `tos2(bytes)` => `string(bytes)` .
- The home page has 3 more examples next to 'hello world' that show the features of the language.
- Lots of bugs and issues fixed.