Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Hed
Mar 31, 2004

Fun Shoe

The Leck posted:

give us barrabas!

Adbot
ADBOT LOVES YOU

My Linux Rig
Mar 27, 2010
Probation
Can't post for 6 years!

PleasureKevin posted:

anyway look like java script bout to do it!
im not too fussed by this if js really is going to adopt proper oo design patterns and strong typing

also Babel looks terrible, use typescript if you're gonna go that direction

exe cummings
Jan 22, 2005

is es6 good?

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

yard salad posted:

is es6 good?

exe cummings
Jan 22, 2005


lmao what the gently caress

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
i actually like it.

but its basically unrecognizable from old js, especially with newfangled SPA frameworks

exe cummings
Jan 22, 2005

Flat Daddy posted:

i actually like it.

but its basically unrecognizable from old js, especially with newfangled SPA frameworks

how well does it work with angular 2.

Baxate
Feb 1, 2011

yeah the export/export default and using curly brackets sometimes for imports but not other times fucks me up all the time

Baxate
Feb 1, 2011

basically in that example if you do

code:
import connect from 'react-redux'
instead of putting the {} around connect like you're supposed to, you import the default export of 'react-redux', who knows what that is, and you've given it a different name, so the 'connect' you imported won't work like you expect (it'll be a completely different function) t'd the errors messages aren't exactly helpful.

its worse when using libraries and you don't memorize all the flipping exports

GameCube
Nov 21, 2006


somebody RP a javascript zealot and defend this, please.

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

GameCube posted:

somebody RP a javascript zealot and defend this, please.

you can find almost everything in this screenshot in python, c#, and poo poo. except for the JSX. but there's nothing wrong with JSX, it just gets compiled to function calls.

exe cummings
Jan 22, 2005

GameCube posted:

somebody RP a javascript zealot and defend this, please.

declarative code is easier to maintain than procedural code

My Linux Rig
Mar 27, 2010
Probation
Can't post for 6 years!

Flat Daddy posted:

i actually like it.

but its basically unrecognizable from old js, especially with newfangled SPA frameworks

good, "old" JS was poo poo tier all around

though talking about es6 now is all kinds wasted breath, the only place to ever use JS is in the front end and no way in hell will anyone be able to practically use it in the front end for at least 10 years

akadajet
Sep 14, 2003

My Linux Rig posted:

good, "old" JS was poo poo tier all around

though talking about es6 now is all kinds wasted breath, the only place to ever use JS is in the front end and no way in hell will anyone be able to practically use it in the front end for at least 10 years

:rolleyes:

PleasureKevin
Jan 2, 2011

GameCube posted:

somebody RP a javascript zealot and defend this, please.

well some of these comments don't seem to detract from JS at all like

"classes just like a real programming language" and "ruby!"

except i guess they're accusing JS of copying ruby?

the HTML is there because this is a React component. not necessarily native javascript. but HTML in the component is a shock at first in React. people are used to having /index.html /js/script.js and /css/style.css and juggling 3 files. in React you can do all 3 in one self-contained file that you can reuse. /button.jsx will be a button with it's HTML mark-up, CSS (optional) and logic in one file that you can import within other components and use again, only passing in different properties to change it how you like.

it's very good.

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


Ludwig van Halen posted:

basically in that example if you do

code:
import connect from 'react-redux'
instead of putting the {} around connect like you're supposed to, you import the default export of 'react-redux', who knows what that is, and you've given it a different name, so the 'connect' you imported won't work like you expect (it'll be a completely different function) t'd the errors messages aren't exactly helpful.

its worse when using libraries and you don't memorize all the flipping exports

:stonk:

how do you gently caress up imports that badly

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord

Ludwig van Halen posted:

instead of putting the {} around connect like you're supposed to, you import the default export of 'react-redux', who knows what that is, and you've given it a different name, so the 'connect' you imported won't work like you expect (it'll be a completely different function) t'd the errors messages aren't exactly helpful.
lmao

PleasureKevin posted:

the HTML is there because this is a React component. not necessarily native javascript. but HTML in the component is a shock at first in React. people are used to having /index.html /js/script.js and /css/style.css and juggling 3 files. in React you can do all 3 in one self-contained file that you can reuse. /button.jsx will be a button with it's HTML mark-up, CSS (optional) and logic in one file that you can import within other components and use again, only passing in different properties to change it how you like.

it's very good.
yeah javascript isn't bad enough on its own so they had to throw html and css in as well

Shaggar
Apr 26, 2006

what the hell even is this?

akadajet
Sep 14, 2003

Shaggar posted:

what the hell even is this?

someone who gets confused by features like modules, inheritance, class annotations, const, and lambda expressions. you know all that poo poo they have in other languages like c# and java

as far as the inline html templates. i dont get it either.

Shaggar
Apr 26, 2006
is it like some ruby thing? what is it?

akadajet
Sep 14, 2003

Shaggar posted:

is it like some ruby thing? what is it?

it's javascript w/ the react template stuff

akadajet
Sep 14, 2003

shaggar you might want to take another l@@k at javascript. it's good now

akadajet
Sep 14, 2003

hey i found shaggar's youtube acct
https://www.youtube.com/watch?v=1e1zzna-dNw

bomb
Nov 3, 2005


yard salad posted:

is es6 good?

yes

Shaggar
Apr 26, 2006

akadajet posted:

it's javascript w/ the react template stuff

lmao

Shaggar
Apr 26, 2006

akadajet posted:

shaggar you might want to take another l@@k at javascript. it's good now

lol no its not. its complete trash.

Shaggar
Apr 26, 2006
like idk how loving brain dead you'd have to be to like javascript. you'd have to be the dumbest motherfucker on the planet.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
node is job handouts for people too dumb to grok python

Asymmetric POSTer
Aug 17, 2005

Shaggar posted:

like idk how loving brain dead you'd have to be to like javascript. you'd have to be the dumbest motherfucker on the planet.

shagger was right

bomb
Nov 3, 2005


Jonny 290 posted:

node is job handouts for people too dumb to grok python

is python 2/3 split still a thing

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
maybe if your janitoring old poo poo? all our shits 3

PleasureKevin
Jan 2, 2011

btw the @connect thing is called a decorator

i use them but i'm not really sure what they do :downs:

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord
c# and java have those too for doing dumb oop poo poo or w/e

cowboy beepboop
Feb 24, 2001

PleasureKevin posted:

btw the @connect thing is called a decorator

i use them but i'm not really sure what they do :downs:

in python they're magic wrapping function things. i use them but don't care enough to find out how they work

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

in python i think if you have a function called pooper which takes a function and returns a new function then you can use it as a decorator like @pooper but it seems unecessarily complicated idk

SpaceAceJase
Nov 8, 2008

and you
have proved
to be...

a real shitty poster,
and a real james
python has no practical uses

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord

SpaceAceJase posted:

python has no practical uses
yeah but at least it can be used in academia

Baxate
Feb 1, 2011

Condiv posted:

:stonk:

how do you gently caress up imports that badly

idk i guess they wanted default exports to be anonymous functions, so when you import it you can give it whatever name you want even if its the name of another export, idk why you'd want to do that tho

akadajet
Sep 14, 2003

Ludwig van Halen posted:

basically in that example if you do

code:

import connect from 'react-redux'

instead of putting the {} around connect like you're supposed to, you import the default export of 'react-redux', who knows what that is, and you've given it a different name, so the 'connect' you imported won't work like you expect (it'll be a completely different function) t'd the errors messages aren't exactly helpful.

its worse when using libraries and you don't memorize all the flipping exports

i'll agree with this. they should have just stuck with commonjs

Adbot
ADBOT LOVES YOU

qntm
Jun 17, 2009

akadajet posted:

someone who gets confused by features like modules, inheritance, class annotations, const, and lambda expressions. you know all that poo poo they have in other languages like c# and java

as far as the inline html templates. i dont get it either.

basically that image is the reaction to es6 of somebody who knows, and is quite happy with, es5

if you do understand es5 but know nothing about es6, then being told that that code is 100% valid javascript is a bit alarming

  • Locked thread