Qi Xiao

Results 250 comments of Qi Xiao

I reworded the title of the issue to reflect my preferred implementation strategy here (some discussion is in #1143).

Use cases for pattern matching: * In the `except` clause of the `try` form. Right now the `except` clause always catches all exceptions, but it is useful to capture *...

Probably the syntax of the pattern does not have to mirror constructs used to build values. In languages with pattern matching, patterns can be not arbitrary expressions, but restricted to...

Languages with pattern matching, we can steal syntax and semantics from them: * Haskell ([in official tutorial](https://www.haskell.org/tutorial/patterns.html), [in wikibook](https://en.wikibooks.org/wiki/Haskell/Pattern_matching)) * Rust ([in the Rust book](https://doc.rust-lang.org/book/second-edition/ch06-00-enums.html)) * Perl 6's `~~` operator...

The matching syntax should be able to express "or", like "(exited grep 1) or (exited grep 2)".

@krader1961 as @hanche said this issue is about pattern matching as found in Haskell, ML and Rust, which are based on the structure of composite values, not regex. The "name...

I vaguely resonate with the feeling that pattern matching can be useful for error handling. However, outputs and errors are not mutually exclusive in Elvish, so modelling this as a...

Oh yeah IO ports should definitely be supported as a first class data type. I haven't been able to spend much time on Elvish recently unfortunately.

Wait actually there's more going on semantically than making IO ports first class in your example: ```elvish var p = (echo "1\n2\n3\n4\n5" | from-lines | capture) $p | take 2...

Elvish the language, minus the syntax and pipelines which are obviously very shell-like, is very much in the Lisp tradition. The main influence of Go is the standard library, but...