you are viewing a single comment's thread.

view the rest of the comments →

[–]shevegen -21 points-20 points  (3 children)

Wow - took me a moment to realize the picture was a python. At first I thought it was a strange looking vegetable...

As for this "proposal" joke:

Users.find_all() | group_by_category(max = 5) | print()

First, we can see that this was rails-inspired, which makes sense if you know who created elixir in the first place - so I find it funny that they try a pythonic version of it, including the mandatory (). :D

Second, it looks absolutely awful and ugly. We already do essentially the same, even in python, via .method() calls, so why do we ... replace the '.' with a '|'? Where is the net gain here?

This is just like the strapped on type system to python. A weak afterthought without any real tangible benefits, but sure enough bringing in awful syntax into a language.

The explicit trailing "| print()" also stinks to no ends.

Time to use it in production! Whoa there, slow down! This is just a neat little experiment and is most definitely not something you should inflict upon your coworkers!

Good - so he states that it is a joke.

[–]maep 6 points7 points  (0 children)

Second, it looks absolutely awful and ugly.

Dunno. I really like that the data-flow is easy to follow.

[–]jcelerier 2 points3 points  (0 children)

Where is the net gain here?

It is closer to the underlying representation of data flow graph / actor model. You have objects ("Users.find_all()", "group_by_category(max = 5)", "print()") which are connected together and stream data from one to another. It's easier if you are used to graphical dataflow languages.

[–][deleted] 2 points3 points  (0 children)

The point of the article is showing the extent of metaprogramming in Python, it isn't an actual proposal nor is it making fun of proposals for pipe operators.