|
you can perform repetitive tasks with virtually no effort using for loops in just about any language. could we be doing the world much better with for loops, or have we exhausted those possibilities already and i just haven't realized it?
|
# ? Aug 10, 2014 19:11 |
|
|
# ? May 15, 2024 08:35 |
|
rotor please change poll to multiple choice, ty v much
|
# ? Aug 10, 2014 19:14 |
|
i think the map function is more suited to operations performed on the world
|
# ? Aug 10, 2014 19:14 |
|
what's a map function. like an html image map? i think that helps only a little
|
# ? Aug 10, 2014 19:15 |
|
exit() suits me fine
|
# ? Aug 10, 2014 19:19 |
|
cure cancer with this one weird old loop construct invented by a mom
|
# ? Aug 10, 2014 19:22 |
|
i havent written a for or while loop in a year. if the problem cant be solved with a combination of mapping and folding then i'm doing it wrong and need to reapproach
|
# ? Aug 10, 2014 19:27 |
|
USSMICHELLEBACHMAN posted:i havent written a for or while loop in a year. unlucky lol functional languages ftl
|
# ? Aug 10, 2014 19:27 |
|
what the frick is folding and mapping?
|
# ? Aug 10, 2014 19:28 |
|
LP0 ON FIRE posted:what the frick is folding and mapping? realyl fail is what they are
|
# ? Aug 10, 2014 19:29 |
|
lol if you need to invoke return or break from within your loop
|
# ? Aug 10, 2014 19:32 |
|
code:
DONT THREAD ON ME fucked around with this message at 19:42 on Aug 10, 2014 |
# ? Aug 10, 2014 19:38 |
|
code:
|
# ? Aug 10, 2014 19:42 |
|
v readable lol
|
# ? Aug 10, 2014 19:42 |
|
functional lanauges are indeed very confusing if you're not used to them unlike iterative languages, which always make sense to people who have never programmed with them before
|
# ? Aug 10, 2014 19:44 |
|
LP0 ON FIRE posted:what the frick is folding and mapping? it's a way to hide for loops behind compiler nonsense
|
# ? Aug 10, 2014 19:45 |
|
actually, loops are just a special case of the map function
|
# ? Aug 10, 2014 19:46 |
life is one big for loop until death makes u think
|
|
# ? Aug 10, 2014 19:55 |
|
physics operate in a way much more akin to a functional language than an imperative language. because physics is based on, and math is all functions. and can you imagine if physics was iterative? you'd have to wait for the universe to run through am assive for loop before you could move your hand or something. lol. also, the universe is lazily evaluate. so the answer to the question 'if a tree falls and the woods and no one is there to see it, does it make a sound?' is both yes and no. the actual answer is that the tree never even falls until someone shows up to observe that it fell.
|
# ? Aug 10, 2014 19:56 |
|
ill make the WIKI!! hah hah hha
|
# ? Aug 10, 2014 19:59 |
|
USSMICHELLEBACHMAN posted:physics operate in a way much more akin to a functional language than an imperative language. because physics is based on, and math is all functions. and can you imagine if physics was iterative? you'd have to wait for the universe to run through am assive for loop before you could move your hand or something. lol. maybe we don't perceive the time it takes to make the loop. the hand movement isn't really separate from anything else. we don't individually choose to do anything
|
# ? Aug 10, 2014 20:11 |
|
until your computer stops retiring instructions sequentially, everything "functional" on top of that is pure wankery
|
# ? Aug 10, 2014 21:14 |
|
code:
|
# ? Aug 11, 2014 00:43 |
|
ForEach-Object
|
# ? Aug 11, 2014 12:32 |
|
just billions of cases and switches
|
# ? Aug 11, 2014 13:23 |
|
USSMICHELLEBACHMAN posted:physics operate in a way much more akin to a functional language than an imperative language. because physics is based on, and math is all functions. and can you imagine if physics was iterative? you'd have to wait for the universe to run through am assive for loop before you could move your hand or something. lol. makes u think
|
# ? Aug 11, 2014 13:40 |
|
The Management posted:what the frick is a for loop? it's a way to hide gotos behind compiler nonsense
|
# ? Aug 11, 2014 13:53 |
|
fruity loops
|
# ? Aug 11, 2014 14:26 |
|
Symbolic Butt posted:it's a way to hide gotos behind compiler nonsense now you're getting it! a for is a test and branch loop, much like a goto with an if. a map is just a way to trick the developer into believing they are doing something other than a test and branch loop in the background.
|
# ? Aug 11, 2014 15:37 |
|
i think we should apply switch statements to this problem
|
# ? Aug 11, 2014 15:46 |
|
Locker Room Zubaz posted:i think we should apply switch statements to this problem Yeah, the op should switch to posting in another forum!
|
# ? Aug 11, 2014 15:47 |
|
Locker Room Zubaz posted:i think we should apply switch statements to this problem why not both?
|
# ? Aug 11, 2014 15:48 |
|
that is so strange looking but cool. look at all those pointers
|
# ? Aug 11, 2014 15:55 |
|
neat as gently caress
|
# ? Aug 11, 2014 16:31 |
|
|
# ? May 15, 2024 08:35 |
|
and completely counterproductive when fed to any compiler written in the last 20 years
|
# ? Aug 11, 2014 17:08 |