sdxjs
sdxjs copied to clipboard
notes on chapter 7 (regular expressions)
- first I was confused by the DOM example with regular expressions (I thought HTML required a regular language to parse and not a regular grammar)
- but section 7.2 explains that it's just an example to show recursive parsing, which makes sense
- it uses some
import Alt from
syntax, maybe that's something I want to learn. Is that ES modules? Or a Node thing? - why isn't the Javascript using semicolons? is that a best practice now?
- TIL about
class X extends Y
, looks like Javascript got classes in 2015. Interesting! -
export default (chars) => new RegexLit(chars)
is interesting, I didn't know you could do that with exports. - does this matching algorithm have a name? I felt kind of unmoored without knowing what this algorithm is called or what family of algorithms it belongs to.
- I was a bit confused by the design patterns, I didn't recognize them. I might just not be a design pattern person though.