3 ms·
Thanks, I hate it. Jokes aside, there is something fascinating about programming languages being abused like this. Like tongue twisters and word games, ain't
by adenozine 6y ago
Thanks, I hate it.
Jokes aside, there is something fascinating about programming languages being abused like this.
Like tongue twisters and word games, ain't these basically the same thing in a programming language instead of a spoken language?
- daniellarusso 6y agoContests: https://www.ioccc.org/ https://www.ioccc.org/
- adenozine 6y agoYeah, that's kind of a similar thing! I guess riddles of obscurity are kinda like using overly esoteric words in conversation. Does that seem like the right parallel? When I see something like the elixir with too many pipes, I think of Dr Seuss rhymes, but when I see obfuscated code, it's kinda like gibberish.
- dnautics 6y agoI think it's fascinating because it exposes some deeper facts about how the language works under the hood
- adenozine 6y agoInteresting perspective! I definitely didn't know about |> def I suppose ruby has dynamic def as well though.
- tel 6y agoI don't think it's dynamic, just macros. a |> foo() |> def do ... end just gets macroexpanded to foo(a) |> def do ... end and then def foo(a) do ... end.
- dnautics 6y agoI didn't know about |> def, but at the same time I'm totally not surprised (you should never use it though). |> case do is a fun one that I actually do use often.
- rkangel 6y agoI've almost written "|> case do" several times and then in each case have decided that it makes sense to a separate private function (with function head matching for the different cases).
- mercer 6y agoI've found "|> case do" to feel 'right' at times when it's at the end of the pipeline.
- higerordermap 6y agoCode golfing?