Peter Leonov

Results 32 comments of Peter Leonov

IMHO, converting S-expressions to node is a quite easy task. Are there any other requirements you see as a must?

True, I find it awesome too :) As far as I remember the AST part of my ruby parser lacks location information, but the lexer does store token locations. So...

As far as I understand, Hegel’s model is very close to Flow’s one: it provides the type system only relying on Babel build pipeline to transpile the code for use...

Say, in my project which is soundly type checked by Hegel I'd create a user space type `MyVector` and allow only the operations not leading to a sparse array. What...

The bounds check is one issue, but there is another deeper one: the “holey” arrays. For a JS developer a value of type ‘Array’ can always have holes in it....

> Would it be useful to have two inbuilt types `Array` and `SparseArray` to represent this ? I also like the idea of having two distinct types here. Following the...

IMHO, this still falls into the category of “utility types” or “builtin type utilities”. At the place where I work the magic is the thing avoided at all costs 😅

Just an addition: ```js function bar(a) { return a ? a : bar(a) } function foo(a) { return a ? a : bar("") } ``` Gives `AnalyzationError: Maximum call stack...

That would be super sweet to make `NaN` a separate type and exclude it from `number`, but making it strictly true requires checking results of [all the arithmetical operations](https://dmitripavlutin.com/nan-in-javascript/#34-indeterminate-forms) 😥.