Daily reminder that if you're still using loops in 2017, you're doing it wrong.
Those programming in dinosaur-era procedural languages like C or Fortran are the exception to the rule.
>>59613778
What is the most futuristic language?
SML ML 1ML ...?
I'm bored
>>59613778
¯\_(ツ)_/¯
>i dont understand abstraction
ok
>>59613778
Are you stupid?
>>59613778
>[overflows stack]
>>59614433
> increments your stack pointer
>>59613778
(define nigger (nigger))
>>59613778
Daily reminder if you still use indentation instead if {} your opinion is invalid
Daily reminder that pufunctional programming doesn't work in the real world.
What should we use instead of loops?
>>59615308
This is exactly why.
>>59615308
You should code every possibility by hand obviously.
>>59615327
>>59613778
Daily reminder if you can't fit all the code you need in one line and use only letters for variables then you are doing it wrong.
>>59615308
Map, Reduce, Filter, etc.
>>59615308
goto
>>59615992
And comprehensions
>>59613778
Should I learn a functional language? I read Norvig's post on writing a Lisp interpreter and now Im curious.
Any big benefit or is it just preference/mindset?
>>59616115
The change in mindset IS a big win.
Daily reminder that functional programming is bloated, inefficient, slow, more complicated and uglier than procedural programming.
>>59615992
These are encapsulated loops.
>>59616144
Even if they use iterators?
>>59616129
procedural & simplicity is the final redpill but its hard to convince the OOP maniacs to it. But functional seems to appeal to their mindsents and functional at least treats data as data and doesn't lead to disgusting do-ers objects or unmaintable shared state being inherited around.
>>59615308
Recursion
>>59613778
Implement stochastic gradient descent in Haskell. Don't cheat with loops or whatever is the equivalent in Haskell.
>protip: it will be a mess
>>59617958
It will be a simple recursion.
>>59618040
>simple
If you say so anon
>>59616513
>>59616639
All of these are turning into loops after assembly, recursion is a social construct.
>>59619188
*moreover, recursion is bloating stack
>>59617958
>Don't cheat with loops or whatever is the equivalent in Haskell.
You don't need loops. Which is good because we don't have them.
>>59613778
>muh abstraction
>>59619209
T H I S
H
I
S
>>59619292
list comprehensions _are_ loops
>>59619209
>>59619330
>they don't know about tail recursion
>>59619188
>All of these are turning into loops after assembly
In some cases, it can compiled into the same assembly, but that doesn't make it a loop.
>>59619342
You are correct. I completely forgot about them because I don't use them, and they're backwards compared to imperative languages, and you use them more like creating a list and mapping over it in the same block, and there is no way to iterate until a predicate is true like a while loop. But yeah, basically a loop