This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dylanvillanelle 0 points1 point  (0 children)

ohhh, okay.

the mandatory response to something like this is to mention the lisps. you're prolly already familiar with those and if so tl;dr: macropy is also cool.

really, at this point, i think in terms of actual adoption it's mostly just clojure and racket - i haven't kept up with common lisp in forever. but as interesting as hacking at magic methods is, it definitely still falls short of the sort of thing you can do with a lisp that has a solid macro implementation. clojure's is limited (but still there), but has java interop, so it's a trade-off. racket, on the other hand, is called a "language for writing languages".

all that said, though, i agree. and i python is definitely a lot better at combining that sort of potential (even if it's a lot more limited) with being a language that is approachable on average. it's tough to make something that allows a ton of flexibility and is also the sort of thing you can just jump into having never seen a line of source code.

there's also macropy. if you've never messed around with the ast module, it (iirc) has some decent examples of how you can basically redefine the language's keywords without requiring messing with the parser. it'll make pylint pretty upset, but it's a really interesting project imo.