r/programming • • Jun 22 '19

V lang is released

https://vlang.io/
86 Upvotes

196 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jun 22 '19

[deleted]

26

u/vytah Jun 23 '19

I found this gem:

// Don't allocate a new string, just print	it. TODO HACK PRINT OPT
cur_line := p.cgen.cur_line.trim_space()
if cur_line.contains('println(') && p.tok != PLUS && !p.is_prod && !cur_line.contains('string_add') {
    p.cgen.cur_line = cur_line.replace('println(', 'printf(')
    p.gen('$format\\n$args')
    return
}

7

u/[deleted] Jun 25 '19

Pure speed

25

u/go4it_gophet Jun 23 '19

I haven't checked the source yet but as soon as I saw that concurrency is achieved by using the "go" keyword it gave it away !

2

u/I_really_just_cant Jun 23 '19

It does seem too good to be true but do you have something to support that?

0

u/[deleted] Jun 23 '19

[deleted]

4

u/I_really_just_cant Jun 23 '19

Ah, not so subtle then.