I just add "Julia" for this list; Ideal for Scientific computing. ( LLVM based; Optionally typed; Dynamic ) https://julialang.org/ https://docs.julialang.org/en/v1/index.html Julia Metaprogramming: https://docs.julialang.org/en/v1/manual/metaprogramming/inde... Julia: "Building a Language and Compiler for Machine Learning" ( compiling to GPU; TPU ) https://julialang.org/blog/2018/12/ml-language-compiler "Why Does Jul…
Ask HN: What metaprogrammable language do you/would like to use?
71–76 of 76 posts
Re: Ask HN: What metaprogrammable language do you/would like to use?
#72It depends a bit what you mean, but Groovy is quite interesting from a meta-programming point of view. Much of the syntax can be completely reprogrammed at run time through an object's 'metaClass', and you can write AST transformations that deeply rearrange the code at compile time. Although it is certainly not as pure as the Lisp-like languages, it can be an incredibly fast and easy way to create a DSL to solve your…
I never thought of Groovy for metaprogramming but it's used to make DSLs so it makes sense. My only run in has been with Gradle which is so slow and/or a memory hog so didn't leave a good impression on me.
Re: Ask HN: What metaprogrammable language do you/would like to use?
#73> Of all the kitchen-sink features that Nim has, I can't accept camelCased == under_scored names otherwise it could have been first. Just to clarify for the general public (because this is often a source of confusion and misunderstandings): first letters are case-sensitive in Nim, so you can do `var car: Car` (where `car` is a name of the variable, and `Car` is a type). When it comes to style-insensitivity, I also th…
I don't see how this is required for one drop and if that's the use case, it sho_uLd only be used there and not everywhere. It makes it harder for tooling and for searching for all references. Inconvenient, like spaces in filenames.
Searching for names is not a problem as people don't mix different styles within the same project. Also there's nimgrep for this.
Finally, getting a compiler error when I try to use variables called should_run and shouldrun in the same scope is a feature, not a bug: it encourage using less misleading names.
Re: Ask HN: What metaprogrammable language do you/would like to use?
#74Earlier quoted context omitted.
Please don't let adherence to stlye-insensitivity limit language adoption.
If it was up to me I would have removed this feature long, but not because it's a problem, only because of people like you who judge programming languages based on what they see at the surface. There are still plenty of people who dislike Python because "significant whitespace, bleh" with no objective reason why they dislike it except "it gets messed up when I copy the code". That's a tooling problem, just like with…
m_?[Yy]_?[Vv]_?[Aa]_?[Rr]_?[Ii]_?[Aa]_?[Bb]_?[Ll]_?[Ee]
I never want to type a regexp like that just to find all occurrences of a simple var name. Even if a plugin did it for me, it would still be slower and it doesn't help me on the command line.Re: Ask HN: What metaprogrammable language do you/would like to use?
#75Earlier quoted context omitted.
I don't see how this is required for one drop and if that's the use case, it sho_uLd only be used there and not everywhere. It makes it harder for tooling and for searching for all references. Inconvenient, like spaces in filenames.
One of the main benefits is in wrapper libraries for C. Another one is using libraries that have a naming style that I don't like. Searching for names is not a problem as people don't mix different styles within the same project. Also there's nimgrep for this. Finally, getting a compiler error when I try to use variables called should_run and shouldrun in the same scope is a feature, not a bug: it encourage using les…
Also, it should never consider hell_owl and hello_w_l to be the same, although each could match hellOwl and helloWL. Basically it takes the style-insensitivity too far.
Re: Ask HN: What metaprogrammable language do you/would like to use?
#76Earlier quoted context omitted.
One of the main benefits is in wrapper libraries for C. Another one is using libraries that have a naming style that I don't like. Searching for names is not a problem as people don't mix different styles within the same project. Also there's nimgrep for this. Finally, getting a compiler error when I try to use variables called should_run and shouldrun in the same scope is a feature, not a bug: it encourage using les…
If it treated 'same scope' to mean something more like a module (i.e. library), that would be better. Also, it should never consider hell_owl and hello_w_l to be the same, although each could match hellOwl and helloWL. Basically it takes the style-insensitivity too far.
There are style guides and nimpretty to help further.