Releases: vlang/v
Releases · vlang/v
0.1.29
v0.1.29
0.1.28.1
vweb: set_content_type()
0.1.28
0.1.28
0.1.27
vfmt
has been re-written from scratch using the new AST parser. It's much faster, cleaner, and can format
files with compilation errors.strconv
,sprintf
, andprintf
in native V, without any libc calls.- 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()
andfilter()
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.- Profiling with
-profile
. Prints a nice table with detailed information about every single function call:
number of calls, average time per call, total time per function. import(xxx)
syntax has been removed in favor ofimport xxx
for simplicity and greppability.- Lots of fixes and improvements in the type checker.
time.StopWatch
dl
module for dynamic loading.- Automatic
str()
method generation for every single type, including all arrays and fixed size arrays. - 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.
- Closures.
- 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.
- The new JS backend using the AST parser (almost complete).
- Variadic functions.
net.websocket
module (early stage).vlib
is now memory leak free, lots ofautofree
improvements.- Simplified and cleaned up
cmd/v
,v.builder
. - V UI was updated to work with the new backend.
0.1.24
- A new parser/generator built on top of an AST that simplifies code greatly and allows to implement new
backends much faster. - Sum types (
type Expr = IfExpr | MatchExpr | IntegerLiteral
). - B-tree map (sped up the V compiler by ~10%).
v fmt -w
.- The entire code base has been formatted with vfmt.
- 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.
- The first tutorial: building a simple web application with vweb.
- 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
. - Fewer libc functions used (soon V will have no dependency on libc).
0.1.23.1
ci: install dependencies for package tests
0.1.23
- Direct x64 machine code generation. Hello world being built in 3 milliseconds.
- Bare metal support via the
-freestanding
flag, allowing to build programs without linking to libc. - Prebuilt V packages for Linux, macOS, and Windows.
string.index()
now returns?int
instead ofint/-1
.- Lots of fixes in Generics.
- vweb framework for developing web applications is back.
- Vorum, the forum/blogging software written in V/vweb, can now be compiled and has been added to CI.
- 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 ofColor.green
) when it's enough. - V UI for macOS.
- Interfaces have been rewritten.
[]interface
support. os.cp()
for copying files and directores.- 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.
- Global variables (only with the
--enable-globals
flag) for low level applications like kernels and drivers. - Nothing can be cast to bool (previously code like
if bool(1) {
worked. <<
and>>
now work with all integer types.- V detects Cygwin and shows an error. (V supports Windows natively)
- Improved type checking of some operators (
%, |, &
etc). - Windows 7 support.
println(true)
now printstrue
instead of1
.os.exec()
now usesCreateProcess
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
. eventbus
module.- Haiku OS support.
malloc/free
on bare metal.utf8
helper functions (to_lower()
,to_upper()
, etc).- Optimization of
for c in str {
. string/array.left/right/slice/substr
were removed ([a..b]
slicing syntax should be used instead).
0.1.21
none
keyword for optionals.- Solaris support.
- All table lookup functions now use
none
. - varargs:
fn foo(bar int, params ...string) {
- Double quotes (
"
) can now also be used to denote strings. - GitHub Actions CI in addition to Travis.
-compress
option. The V binary built with-compress
is only ~90 KB!- More memory management.
- 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.- Multiple returns (
fn foo() (int, string) {
). !
can now only be used with booleans.
0.1.20
- 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.
- Official Android support (only console applications via Termux for now).
- 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.
0.1.19
- 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. - New
mysql
module. - Better error format that is supported by all major editors (go to error).
- Error messages now point to the actual place where the error happened.
- Custom json field names:
struct User { last_name string [json:lastName] }
. - Raw json fields via the
[raw]
attribute. - All C code was removed from the
freetype
module. gg
module can now render all Unicode characters.[typedef]
attribute for imported C struct typedefs.- Support of Objective C interfaces (primarily for using Cocoa).
- REPL: clear command and custom functions.
- REPL tests (which are also used for testing certain compiler errors).
- Syntax bug fixed:
foo[0] += 10
is now possible. - http: support plain HTTP protocol and follow redirects.
- http: header data is now processed correctly.
- net: basic UDP support.
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.- JavaScript backend!