Delyan Angelov

Results 270 comments of Delyan Angelov

In Rust: `assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));` i.e. the order of the results is `left` then `right`, while in the V version it is `right,left`: ```v ext2, path2 := 'home/dir/lang.ts.dts'.rsplit_once('.')? assert path2...

imho, V would have to support both for a while, then vfmt should be made to convert the `it` to `index`, then after a while there should be a deprecation...

Note: `println( (var or { 100 }) )` does work without a cgen error. So does: `dump( (var or { 100 }) )` and `dump(var or { 100 })` .

@medvednikov consider this: ```v mut a := []?int{len: 5} a[1] = 123 a[3] = 456 dump(a) ``` which produces: ``` [a.v:4] a: [Option(0), Option(123), Option(0), Option(456), Option(0)] ``` (which should...

> What's the usecase for an array of options? I'd rather ban that than make arrays slower and more complex. For example, an array of thread results, where each thread...

> make arrays slower I was wrong, it is used not for `x := a[i] or { default }` but for strings: `r := s[i] or { default_rune }` -...

For string.at_with_check, I do agree, that it should return an option and `none` instead of the error, since the individual elements are concrete bytes/runes, so there is no confusion possible...

` match .$item {` Why not just ` match item {` ? At this point in the code, `item` is already an instance of `EnumData`, just like `field` for the...

Same with `if .$item == .foo {` - it could have been just `if item.value == .foo {`

> > ` match .$item {` > > Why not just ` match item {` ? > > At this point in the code, `item` is already an instance of...