Re:What’s New in Python 3.8
by elcritch on Tuesday October 15, 2019 @03:34AM
(#21256319)
Pretty trivial to do with proper macros in a language. Julia has macros for printing variables and values, like `@debug(var)`.
There's an Elixir library with macros to make a map (dictionary) using the variable names passed in [1]:
iex> import ShorterMaps
...> name = "Chris"
...> id = 6
...> ~M{name, id}
%{name: "Chris", id: 6}
Though wether its a good idea or not is another question. ;) If you want to do the type of programming you're talking about you should try Elixir/Julia/Clojure(/Rust?)... or any number of other languages with macros.
There's an Elixir library with macros to make a map (dictionary) using the variable names passed in [1]:
Though wether its a good idea or not is another question. ;) If you want to do the type of programming you're talking about you should try Elixir/Julia/Clojure(/Rust?)... or any number of other languages with macros.1: https://github.com/meyercm/shorter_maps