[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Daily reminder that if you're still using loops in 2017,

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 35
Thread images: 4

File: lambda.png (7KB, 375x375px) Image search: [Google]
lambda.png
7KB, 375x375px
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]
>>
File: ErikMeijer.jpg (18KB, 220x331px)
ErikMeijer.jpg
18KB, 220x331px
>>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.
>>
File: image-20161005-15882-13x0gd1[1].jpg (18KB, 237x237px) Image search: [Google]
image-20161005-15882-13x0gd1[1].jpg
18KB, 237x237px
>>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
>>
File: 1479695341464.png (129KB, 350x350px) Image search: [Google]
1479695341464.png
129KB, 350x350px
>>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
Thread posts: 35
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.