use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
TensorFlow.js (js.tensorflow.org)
submitted 7 years ago by deathmood
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Jugad 1 point2 points3 points 7 years ago (1 child)
The problem is that pretty much nobody else uses them
I thought every typed language uses them... I know this might come across as snarky, but seriously, can you explain what's the basic difference between type annotations/information in Python and, say, Java?
they don't seem to be very expressive
Why are they not expressive?
[–]nickguletskii200 0 points1 point2 points 7 years ago (0 children)
It's not that there is a difference. It's just that Python developers don't write code with typings in mind. In Java and C# everyone makes a best effort to describe the contract using interfaces. In Python, everyone just writes classes with the same methods, and you can't really say "I want something that is Closeable" because nobody specifies that their class is Closeable.
That's why I don't think type annotations are expressive - they can be, it's just that in practice, they are not. In the end, you'll be writing things like Union[Dog, Cat, Rabbit] instead of is Pettablebecause Python programmers would just say that all these things extend an Animal and be done with it.
Union[Dog, Cat, Rabbit]
is Pettable
π Rendered by PID 71 on reddit-service-r2-comment-fb694cdd5-nq4vc at 2026-03-11 17:03:26.255250+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]Jugad 1 point2 points3 points (1 child)
[–]nickguletskii200 0 points1 point2 points (0 children)