Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Computer Science

Name: Anonymous 2006-10-30 14:52

I might be taking a course in Computer Science at a Uni soon, what languages are commonly used @ Computer Science?

Name: Anonymous 2006-11-02 13:05

Here are some common functional programming tools (note: not all functional languages support all of these, and there are many I won't list):

1. First class functions. Functions are just another datatype. C has this, kinda.
2. Higher-order functions. Functions can be returned by functions. C has this, kinda.
3. Anonymous functions. Use-once functions which you don't need to define so formally. You typically use them to pass some functionality (operation, behaviour, not just data) to another function, or return it.
4. Dynamic functions. You can create functions dynamically. For example, you can have a function create a new function on-the-fly for you, based perhaps on parameters. But this isn't nearly as interesting as...
5. Closures. Functions which are defined inside another function, having their own variables, but also sharing their parent's, even if the parent is no longer running.
6. Lists and dictionaries as a base type, with proper syntax support. You'll discover you can do so much with these. Lists are a basic building block of applications. Dictionaries allow you to implement dynamic structures, trees, sets, and more. They are natively supported and offer a lot of functions to deal with them. It's far more useful to have few data types with a lot of functions to do stuff with them, which you'll presumably use a lot, than a lot of data types (classes, static structures) each with a reduced set of functions which you can't be reusing all the time.
7. List comprehensions, which allow you to build a list from a combination of iterations and conditions of other lists, as in [i * 2 for i in mynumbers if IsPrime(i)] (creates a list containing all primes in the mynumbers list, doubled).
8. Useful list-function functions: map, which applies a closure/anonymous function/function to a list (or a series of lists, read in parallel) and returns a list with the results. filter, which returns a subset of a list for which a closure/function/etc is true. max and min, which find the maximum and minimum values of a list (perhaps with a custom definition of what's maximum and minimum). fold/reduce, scanl/r

Name: Anonymous 2006-11-02 13:14

>>41
Premature postaculation

9. Useful higher-order functions, like for example curry/partial, which return a function which is the same as another function for which some parameters have been set.
10. Other list tools like while (returns elements while some function is true), also useful for generators (sequences whose elements are determined as they are requested).
11. Lazy evaluation: stuff, like list elements, gets defined but doesn't get really calculated until you actually need it.
12. Tail recursion AKA tail call optimization: A function may call another function (typically itself) as its last subexpression, in which case the function gets replaced by the next function without increasing stack size, so that you can implement massively recursive algorithms which work almost as fast as their usually much longer, usually more complex and sometimes harder to think iterative counterparts (e.g. factorial).
13. Everything an expression. You'll want everything to be an expression (and rarely rely on statements). The more stuff you can accomplish with an expression, the better.

Note that there are pure functional languages like Haskell, which are kinda extremist and deal with pretty complex concepts; looser functional languages like Lisp which implement different ways to do things and allow you to work differently when it's really a pain in the ass to stick to pure functional programming, and even more down-to-Earth, realistic languages such as Python or Ruby which support most of the features I mentioned, but allow you to combine this power with traditional programming and OOP. I prefer this last kind as it's the most flexible and allows me to do the right job with the right tool all the time, but YMMV.

Name: Anonymous 2006-11-02 22:12

HLA?

Name: Sgt.Kabuˉᬐkiman噌攞 2012-05-28 20:40

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Name: Anonymous 2013-09-01 13:40


Cantor applied his concept of one-to-one correspondence to infinite sets;[1] e.g. the set of natural numbers N = {0, 1, 2, 3, ...}. Thus, all sets having a one-to-one correspondence with N he called denumerable (countably infinite) sets and they all have the same cardinal number. This cardinal number is called ℵ0, aleph-null. He called the cardinal numbers of these infinite sets, transfinite cardinal numbers.

Name: Anonymous 2013-09-01 15:58


Sets alone. This includes the most common axiomatic set theory, Zermelo–Fraenkel set theory (ZFC), which includes the axiom of choice. Fragments of ZFC include:

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List