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

Pages: 1-

The best programming language

Name: Anonymous 2012-09-15 19:27

What's the best programming language?

Name: Anonymous 2012-09-15 19:42

It's obviously C, you can do EVERYTHING with it, I mean EVERYTHING. From games to applications and even a new kernel for your Turing machine, EVERYTHING, ᴇᴠᴇᴙᴉᴛḧᴉᴎ◶!!¡¡

Name: Anonymous 2012-09-15 19:50

Common Lisp.

>>2
C doesn't let one do everything since the programmer is finite. The very limited means of abstraction C provides ultimately limit your mind's power and thus the program's quality.

Name: Anonymous 2012-09-15 19:52

>>2
everything you can do in C you can do in D

Name: Anonymous 2012-09-15 19:57

>>4
Hax my anus in D

Name: Anonymous 2012-09-15 20:34

javascript

closures, callbacks, blah blah i've said this all before

it's unmatched

Name: Anonymous 2012-09-15 20:46

>>6
=, ==, ===, ...

Name: Anonymous 2012-09-15 20:49

PHP got closures right, unlike JavaScript. Take what you will from that.

Name: Anonymous 2012-09-15 21:12

>>6
It's got some of the worst support for those things. It's still a great language, but mostly by comparison to popular stuff.

>>8
Terrible! For those of you not in the know, PHP doesn't even have closures.

Name: Anonymous 2012-09-15 21:52

Any niche language is the best.

Name: Anonymous 2012-09-15 22:28

>>6
you're a Terrible! troll

Name: Anonymous 2012-09-15 22:32

>>11
Hi, you must be new here. There's a nuance to that idiom, which you've missed.

Name: Anonymous 2012-09-15 22:33

>>9
Yes it does you nigger cum. You just need to explicitly declare what you take as the closing context. I'll post more later on about what I meant by having superior closure than JavaScript, since I'm now in the toilet taking a dump.

Name: Anonymous 2012-09-15 22:49

lambda calculus/LISP
Runner up: W++

Name: Anonymous 2012-09-16 0:16

>>13
See that's where you're confused. Those are arguments, not lexical closures. By definition.

Name: Anonymous 2012-09-16 2:09

>>13
since I'm now in the toilet taking a dump
aka submitting a php feature request

Name: Anonymous 2012-09-16 2:51

>>16
I don't need  to defend PHP. It has lots of warts. The point I'm making is closures in PHP > closures in JavaScript. Observe:

PHP:

$callbacks = array();

for ($n = 1; $n <= 3; $n++) {
    $callbacks[] = function() use ($n) {
        print $n . PHP_EOL;
    };
}

foreach ($callbacks as $callback) {
    call_user_func($callback);
}


The above will print the numbers 1 2 3 each on its own line. Nothing surprising there.

JavaScript:

callbacks = [];

for (n = 1; n <= 3; n++) {
  callbacks[n-1] = function() {
    print(n);
  };
}

for (i in callbacks) {
  callbacks[i].apply();
}


While the seemingly equivalent JavaScript will print 4 4 4 like a retard. PHP in this regard is better for observing the principle of least astonishment. The PHP version can be easily converted into retard mode (which has it uses) by doing:

use (&$n)


instead.

Name: node.js_gallery_programmer 2012-09-16 7:27

>>17
Shit! What have I done all this time! PHP was clearly the superior language.

Name: Anonymous 2012-09-16 7:34

>>17
use ($n)

`>having to manually declare which local variable is used in this context
`>my_anus_when.cpp

PHP confirmed for autism

Name: Anonymous 2012-09-16 7:38

>>19
You call it autism, I call it partial macro apply.
PHP confirm for being in the same league as Lisp.
Other languages are you even trying?

Name: Anonymous 2012-09-16 7:46

PHP variables are always function local unless declared otherwise so that keeps things consistent, PHP is shit but at least they didn't try to be clever here, it looks to be as close to a Scheme-tier scoping mechanism as you'll get out of any of the scripting languages. Look at the rest of them, they have magic quantum somewhere scoping, because nobody has read SICP and their language creators are all ``opinionated'' and seek ``elegance''.

Name: Anonymous 2012-09-16 12:36

." Forth"

Name: Anonymous 2012-09-16 13:10

>>22
Are Forth's inventors, Charles Moore, Jewish?

here is one Moore:
http://centraltexasendoscopy.com/physicians/charles-h-moore-md

and he looks Jewish, so Jews do use this surname.

Name: Anonymous 2012-09-16 13:14

>>23
However Forth's Moore doesnt look like a pure Jew:
http://www.colorforth.com/bio.html

Name: Anonymous 2012-09-16 15:57

>>17
it doesn't really make much of a difference. to me JavaScript's way makes more sense. It never really comes up but all you'd need to do is add more closures:


for (var i = 0; i < 3; i++) {
  a[i] = (function (j) { return function() { console.log(j) }; })(i);
}


The "use" thing from PHP is just plain weird... what other languages use that form?

Name: Anonymous 2012-09-16 16:05

      / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
      | Pining pillar
      \_  ______
         ∨
                    / ̄ ̄ ̄ ̄ ̄ ̄ ̄
        ∧_∧        | of the wild willows end
       ( ´∀`)       /へ._______
       (    っ-~ ∧ ∧
  ∧_∧-ニニニニニニニ─、(゚Д゚;)
 ( ・∀・ )        ヽ⊂  ヽ
 (    つヽ、    ∧_∧\ ノ~
  し__) \  ニニ(    ). \    / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
        || ̄ ̄ (    ) ̄||   < womanly waiting
            (__○ノ       \________
   ∧
/ ̄   ̄ ̄ ̄ ̄ ̄ ̄
|  for her manly friend
\________

Name: Anonymous 2012-09-16 16:14

>>21
it looks to be as close to a Scheme-tier scoping mechanism as you'll get out of any of the scripting languages.
I'd be surprised. For example, FFOC:

local x = 1
do
  local x = 2
  print(x) --> 2
  do
    local x = 3
    print(x) --> 3
  end
end
print(x) --> 1

local closures = { }
for i = 1, 5 do
  closures[i] = function () return i end -- IIFEs? What are those?
end
print(closures[1](), closures[3](), closures[5]()) --> 1, 3, 5

local x, y = "foo", "bar"
function f ()
  local x = "baz"
  return x, y
end
print(f())  --> "baz", "bar"
print(x, y) --> "foo", "bar"

loadstring "local foo = 10"() -- Why even have a separate module scope when regular locals work just as well?
print(foo) --> nil


No magic here!

Name: Anonymous 2012-09-16 16:58

s9.postimage.org/qpgnhjybj/lang_joke.jpg

Name: Anonymous 2012-09-16 17:45

Javascript is best. It's fast, elegant, and you can use it on server AND on client, which was kind of a holy grail before the invention of node js. So you can just learn javascript, and you won't need to learn any other language!

Name: Anonymous 2012-09-16 17:51

>>29
Before JS the client wasn't hosted on a browser. Progress ain't linear.

Name: Anonymous 2012-09-16 17:53

dynamic binding considered harmful···

Name: Anonymous 2012-09-16 20:35

D, because it has the best templates and it does concurrency right.

Name: Anonymous 2012-09-16 21:03

>>32
Bleh. D is just a better C++. It does have some phenomenal features for a C-family native assembly language, but you don't really need templates for generics. (What some languages call "metaprogramming" some other languages call, simply, "programming.")

I don't think anyone's gotten concurrency right. Actors are right to a limited degree. Join calculus also. If you really want one, the other will work but it won't do.

And if your language isn't safe with regards to shared memory, you still have all the issues we've had in the past. In that case, whatever model you've got it's worse than just about anything in the safe category.

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