←back to thread

160 points leontrolski | 4 comments | | HN request time: 0.656s | source
Show context
Y_Y ◴[] No.41887424[source]
If only there was a language that let you modify the interpreter on the fly so you could do this as part of normal execution...
replies(4): >>41887458 #>>41887499 #>>41887640 #>>41888996 #
1. klibertp ◴[] No.41887640[source]
You're Lisp-baiting, aren't you? ;) I'd add Elixir next to Nim (already mentioned); also Rust. Recently, also Scala.

The reason we don't have such metaprogramming available everywhere is mostly because you have to subscribe to a particular ideology to allow it. If you think programmers are generally intelligent and responsible, you put macros and metaclasses in your language. If, on the other hand, you think most programmers are dumb code monkeys (with a few exceptions, maybe) your language becomes like early Java or early Go.

replies(2): >>41887659 #>>41887668 #
2. keybored ◴[] No.41887659[source]
That dichotomy is interesting considering Guy Steele’s Growing a Language talk and his Scheme background. But maybe just mentioning Scheme is misleading here...
replies(1): >>41891495 #
3. Y_Y ◴[] No.41887668[source]
(Isn't lisp-baiting the raison d'être of hn?)

Since you mention it, Python does have a fairly elaborate metaclass system, but it seems like it's only really used for implementing the language and rarely if ever wielded by "users". I guess that's a reflection of the language ideology you're talking about.

Also for what it's worth, I know myself to be a dumb code monkey, but being in the CRUD gutter doesn't preclude me from looking at the metasyntactic stars.

4. klibertp ◴[] No.41891495[source]
Thanks for bringing it up. I had a good read. I agree entirely with Steele! It's ironic, however, that it's written in the context of Java - he mentions just three features that would make Java growable: generics, operator overloading, and value types. We all know how it went: generics were added sometime later, but there's still no operator overloading, and value types came to the language 20 years after the talk :)