Jeff Niu

Results 53 comments of Jeff Niu

This is still reproducible in the playground as of today. The kernel reliably crashes on simd_width 16 and above and not at 8. Click to see updated code ```python from...

cc @River707 @walter-erquinigo getting a crash trace from the playground would be useful here.

It's not "intended" to be a limitation, but it is a current limitation.

@willghatch fixed this! This in the next release you will be able to access declarations outside structs.

> because the person writing that line of code surely realizes that the variable they are defining is one that already exists I definitely do not, because I make this...

> @lattner Is it intentional that the Mojo compiler currently permits shadowing from within a nested scope, but not from within the same scope? i.e. is it intentional that the...

> `let` should be immutable in its scope only, and possibly not visible outside its block scope. If we shadow it in its scope, it would not make sense to...

The code you have shown will work in Mojo. In Mojo, implicitly declared variables are function-scoped, and implicitly declared variables are only allowed inside `def` functions. Explicitly declared variables with...

We don't have multiple scoping rules for different "kinds" of variables, but rather it's where we choose to place implicitly declared variables. The rule is that implicitly declared variables are...

As a statically compiled language with initialization guarantees, Mojo will never perfectly match the behaviour of Python when it comes to dynamic initialization. In addition, the code you showed will...