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

Pages: 1-

Hipster Scoping

Name: Anonymous 2012-09-16 23:31

Name: Anonymous 2012-09-16 23:55

Le redditlols imprinting wisdom on each other. I love how they bash PHP even though their comments obviously shows they know jack shit about the language. Every time I read these kind of shit I always close my eyes, imagine their collective faces and proceed to beat the living crap out of their asses.

Name: Anonymous 2012-09-17 0:11

>>2
Every time I read these kind of shit I always close my eyes, imagine their collective faces and proceed to dismember their collective asses with the super-human quickness of my sword-strokes.

http://www.youtube.com/watch?v=y_2UuJxIy_o&t=2m53s

Name: Anonymous 2012-09-17 0:29

``Making assignment and declaration two different "things" is a huge mistake. [...] As an existence proof, Ruby gets along just fine without it.'' -- jashkenas

http://web.archive.org/web/20080723131545/http://wiki.rubygarden.org/Ruby/page/show/LocalVariablesAndBlocks#currentbehavior

``[...] I needed block local variables, so I made the
current local variable scoping rule, which is "when a new local
variable appears first in a block, it is valid only in the block".

And *I was wrong*.  This rule is the single biggest design flaw in Ruby.  You have to care about local variable name conflict, and you will have totally different result (without error) if they conflict.

So, we are talking about a part of many-year-long effort of fixing this flaw.'' -- matz

oops

Name: Anonymous 2012-09-17 2:21

>>1
SUITS ME FINE, HOPSCOTCH.

Name: Anonymous 2012-09-17 3:38

https://tech.dropbox.com/?p=361

i dunno these dropbox guys look pretty hardcore and they seem to like it

Name: Anonymous 2012-09-17 5:37

Typical CoffeeScript/Ruby user: http://www.youtube.com/watch?v=wK73XavbIqs&t=1m2s

Name: Anonymous 2012-09-17 16:49

https://github.com/raganwald/homoiconic/blob/master/2012/09/actually-YOU-dont-understand-lexical-scope.md#actually-you-dont-understand-lexical-scope

from one of the great computer scientists of yesteryear

fuck I love when idiots spout stupid opinions and then get shit on for it.

Name: Anonymous 2012-09-17 17:02

>>8
Jesus fucking Christ, I didn't know var was that fucked up.  I thought more highly of javascript.

Name: Anonymous 2012-09-17 17:26

use FFOC, get awesome scoping that works
that feel

Name: Anonymous 2012-09-17 17:29

This thread seems related.
http://dis.4chan.org/read/prog/1344905659

Name: Anonymous 2012-09-17 17:40

ask margaret rouse

she speaks fluent Geek, Biz-speak, Cloud, SAPanese, VAR, BI/BA, Storage, Security, Agile, Networking, SEO and marketing. she spends her days translating these highly specialized languages into plain English.

 http://whatis.techtarget.com/contributor/Margaret-Rouse

Name: Anonymous 2012-09-17 17:43

It's almost as if JavaScript devs have Stockholm Syndrome, and it isn't enough to love their prison, they have to hate anyone who tries to leave the village.
Almost? More like certain.

Name: Anonymous 2012-09-17 19:09

or because it's the only mainstream/useful language with truly first class lambdas. with shorter function expressions, and generators/lazy lists it would be perfect.

Name: Anonymous 2012-09-17 19:13

or because it's the only mainstream/useful language with truly first class lambdas.

IHBT

Name: Anonymous 2012-09-17 19:31

Javascript is the most powerful language. Its main critics are the C and Java programmers who refuse to learn functional programming.

Name: Anonymous 2012-09-17 19:45

>>14
JavaScript 1.7 has generators: https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.7
JavaScript 1.8 has "expression closures" (shorter function expressions) and "generator expressions" (lazy array comprehensions): https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.8

Name: Anonymous 2012-09-17 19:50

>>17
innovative!

Name: Anonymous 2012-09-17 21:42

>>15

http://en.wikipedia.org/wiki/First-class_function#Language_support

languages with 100% support:

scheme
clojure
ml
haskell
scala
javascript
perl 6

Name: Anonymous 2012-09-17 21:43

>>19
can a language be 71% first-class function

Name: Anonymous 2012-09-17 21:54

>>20
yes, python 2.X

Name: Anonymous 2012-09-17 22:10

>>19
JavaScript is the only mainstream language in that list.

Name: Anonymous 2012-09-17 23:42

CoffeeScript dev replies to the lexical scoping issue:
https://github.com/raganwald/homoiconic/blob/master/2012/09/actually-YOU-dont-understand-lexical-scope.md#actually-you-dont-understand-lexical-scope

I think he is unaware of his own stockholm syndrome

Name: Anonymous 2012-09-17 23:48

>>19
you forgot lua. AGAIN!

Name: Anonymous 2012-09-18 0:34

Lua is even less mainstream than Prolog

Name: Anonymous 2012-09-18 0:57

>>25
plus it doesn't even have first-class functions anyway

Name: Anonymous 2012-09-18 1:37

>>26
Ok, let's play the game. Name a characteristic of first class functions that lua's form lacks and I will try to produce code that does it.

Name: Anonymous 2012-09-18 4:23

>>26
I've used Lua and it had first class functions from what I could tell. It has a lot in common with JavaScript and you can even do prototype based programming using its metables.

Name: Anonymous 2012-09-18 4:24

Name: Anonymous 2012-09-18 5:06

>>1
I read that as "Hitler Scoping"

Name: Anonymous 2012-09-18 5:23

>>30
GENOCIDE MY ANUS

Name: Anonymous 2012-09-18 8:04

Name: Anonymous 2012-09-18 8:16

>>29
lies

Name: Anonymous 2012-09-18 17:52

>>27

In programming language design, a first-class citizen (also object, entity, or value), in the context of a particular programming language, is an entity that can be constructed at run-time, passed as a parameter, returned from a subroutine, or assigned into a variable

do it

Name: Anonymous 2012-09-18 19:23

First-class functions are boring.
What everyone really needs is a language with first-class macros.

Name: Anonymous 2012-09-18 19:35

360 noscoping

Name: Anonymous 2012-09-18 22:39

>>34
U WOT M8

f = function(g)
    return function(x)
        return f(g(x))
    end
end

Did I miss something?

Name: Anonymous 2012-09-19 5:12

>>4
It's good to see Matz admit his mistakes, a rarity these days.

Unlike some guido who thinks he is always right (and he is not).

Name: Anonymous 2013-07-26 9:13

Name: Anonymous 2013-07-26 9:32

Replacing JavaScript, CoffeeScript introduces a lot more problems than solves.

1. CoffeeScript has broken lexical scoping, which is unforgiving and leads to untraceable bugs, far worser than in JavaScript, because without variable shadowing, inner code could end up changing any outer variable by mistake, breaking referential transparency. In effect at any time you must remember names of all outer and inner variable. CoffeeScript arguably has the worst and most confusing scoping rules of all scripting languages, surpassing even Perl.
2. CoffeeScript is not a language, but a preprocessor for JavaScript. CoffeeScript doesn't introduce dramatic new ways to organize programs like continuations, promises, or monads. You don't "Think in CoffeeScript," you "Think in JavaScript", pre-processed JavaScript. CoffeeScript has a different syntax, but only in the most superficial way: if JavaScript was English, CoffeeScript wouldn't be another language like French, it would be technical jargon like the conversation one programmer might have with another. So you write @method() instead of this.method() - that's an obfuscated shorthand notation, not a language. CoffeeScript makes debugging harder: you still have to look into generated JavaScript, when something goes wrong, and auto-generated code is not something you want to see everyday.
3. Syntactic nightmare: FIOC or Forced Indentation of Code (aka offside rule) worsens already present JavaScript's automatic semicolon insertion, while the rest of the syntax becomes less orthogonal: for example, there are four versions of `if` - "if C then T else E", "T if C", "if C <newline> T <newline> else E", and "switch when C then T else E". CoffeeScript has set theoretic comprehension notation; it looks passable on the demo page, but in practice you will end up with something like this: "wash plate, brush, sink for key, plate of dishes when plate.dirty if meal.status is 'done'" - that is readable, but incomprehensible code.
4. JavaScript had just true and false, but CoffeeScript has true, yes, on, false, no, off. CoffeeScript also adds @ as an alias for this, and a special operator `in`. Traditional for badly designed languages, arithmetics on strings generates even more confusion: A + B # does this code works with numbers or strings?

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