|
|
Log in / Subscribe / Register

An overview of structural pattern matching for Python

An overview of structural pattern matching for Python

Posted May 4, 2022 9:29 UTC (Wed) by Wol (subscriber, #4433)
In reply to: An overview of structural pattern matching for Python by epa
Parent article: An overview of structural pattern matching for Python

> I don’t think there is any language that can easily add new keywords. You always end up with ugliness like _bool. Perl started out with an explicit & prefix for subroutine calls but soon dropped it because everyone prefers to see a bare word, even though it will make it hard to add new builtin functions or keywords later.

DataBASIC (depending on your variant) uses REM to mean four different things. Different compilers interpret it differently.

I always used to use it as a variable, but it was also a function (REMainder). Then someone added using it as a statement (REMark). And you could also use it as a label ...

Which variants of REM your compiler accepted depended on the compiler. I think modern versions accept every variation except maybe the variable. Which is a pain, because one of the biggest implementations of its time used it that way ...

Cheers,
Wol


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds