News for hackers. Stuff that matters.
Re:Why Ruby Has Symbols by agalunar on Thursday April 14, 2022 @08:53AM (#31026295)
> When AST is built, it is validated to make sure it makes sense (that’s called lexing) and converted it to the bytecode.

I've never heard "lexing" used this way, and I believe it's simply incorrect. Lexing (tokenizing) precedes parsing (parse tree and then syntax tree construction). It isn't syntax tree validation.

Or so I thought. Are there other examples (besides this article) of "lexing" also being used to mean something else?

Re:Why Ruby Has Symbols by dmitrytsepelev on Thursday April 14, 2022 @08:59AM (#31026368)
Thank you for catching that! Not sure where my eyes were, feels like it's a remnant of another version of the sentence. Removed
Re:Why Ruby Has Symbols by agalunar on Thursday April 14, 2022 @09:11AM (#31026506)
No problem! Same thing happens to me, where my eyes begin to gloss over things I've written (because I know what I mean to say).

Thanks for the submission!

Re:Why Ruby Has Symbols by carapace on Thursday April 14, 2022 @12:29PM (#31029214)
BTW, a good technique for catching those kinds of mistakes is to read the piece out loud. Engaging more of your nervous system makes the visual elision easier to detect.
Re:Why Ruby Has Symbols by Existenceblinks on Thursday April 14, 2022 @10:07AM (#31027230)
I think, it's called "elaboration" (In Standard ML) .. into elaborative semantics (AST that makes sense for evaluation phrase).
Re:Why Ruby Has Symbols by nine_k on Thursday April 14, 2022 @10:20AM (#31027400)
> validated to make sure it makes sense

Indeed, I always thought that it's called "syntax checking" :)