re: A crazy idea and a proof of concept VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Not a TS user, but looks like a really cool idea. As per the questions, I'd go for the TS signatures for searching. All in all, ts-earch users will...
 

Thanks for the comments! Very useful suggestions!

I haven't made up my mind yet about the query language. A "DSL" could be much simpler than the actual definition. For simple signatures there's no much change:

(type: string, id: string) => string
// vs
string, string => string

But for more complex ones it could become easier to type:

<A, B>(array: A[], fn: ((a: A) => B)) => B[]
// vs
<A, B> A[], (A => B) => B[]

But I did not consider the fact that it would mean learning something new. That is a strong argument.

Yeah a ML/NPL solution could also be the case. But I guess it makes more sense your your idea (which, btw, is really cool).

Yeah, I will definitely take a look at how other languages do and even how TS itself does the type resolution. Now I implemented something pretty naive. Will write a bit more in the coming week/s.

code of conduct - report abuse