MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/igvny1/python_goes_brrrr/g2wuxwf
r/ProgrammerHumor • u/das_freak • Aug 26 '20
789 comments sorted by
View all comments
Show parent comments
1
Aren't javascript objects all just dictionaries essentially? You may not be able to represent the values exactly, but I don't see why you couldn't just do something like this: "{x:1,y:2.7,foo:function(bar)}"
5 u/zedpowa Aug 26 '20 Because JSON can't encode JS functions for example
5
Because JSON can't encode JS functions for example
1
u/00PT Aug 26 '20
Aren't javascript objects all just dictionaries essentially? You may not be able to represent the values exactly, but I don't see why you couldn't just do something like this: "{x:1,y:2.7,foo:function(bar)}"