Comment

Comment by jll29

I liked what I read, although the size of the original Lua embedded interpreter has a particular aesthetic that any type inference feature takes away (in return, you get type safety, it's a fair trade-off).

But when I tried it without reading to much, I got this (bug or feature)?

Code:

  --!strict
  local x: number = 2;
  print("Hello World!")
  x="test"
  print(x)
Output:

  Hello World!
  test
There wasn't any error message or warning when I pressed the run button, and that certainly violated my expectations, regardless whether the code and behavior may be considered "correct" (=documented) or not.
parent jll29 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton