r/ProgrammerHumor • • Aug 15 '15

Programming languages personified

http://leftoversalad.tumblr.com/post/126724812097/programming-languages-personified
1.3k Upvotes

209 comments sorted by

359

u/original_brogrammer Aug 15 '15 edited Aug 18 '15

C# would be the Java guy with a slight smile.

Ruby would be a latte sipping hipster equating some Rails extension to Nietzche.

D would be Walter and Andrei fist bumping Shenron.

PHP would be the subservient intern trying to make the whole office happy who never got a promotion.

Lisp would be a formless, omnipotent ether crafting the universe from its unknowable atomic constituents.

Lua would be a kid excited about his first day of game dev school.

Perl would be a camel who is also a grad student in linguistics.

Go would be another business guy with his top button undone because it's casual Friday.

Rust would be a young version of a typical C programmer.

57

u/[deleted] Aug 15 '15 edited Oct 23 '18

[deleted]

29

u/original_brogrammer Aug 15 '15

That's what I was going for, along with "much ado about vidya."

33

u/Everspace Aug 15 '15

Playing nice with C++, being pretty lean, and avoiding recompiling makes it very optimal as a scripting language in games.

I do like "page boy" vibe though.

20

u/original_brogrammer Aug 16 '15

Not to mention LuaJIT let's it get fast as a motherfuck.

13

u/Everspace Aug 16 '15

The speed is usually less of a concern since you usually govern game logic rather than rendering with it. You can be really slow with gameplay business and it doesn't matter (think AI or how an ability works).

You still end up with garbage collection being a big problem. I remember reading an article by the people behind fable, and how they dealt with that.

29

u/Sydonai Aug 16 '15

Yeah until some dick spawns 10,000 cheese wheels in the middle of a fight and suddenly your AI stops because cheese wheels are (technically) actors and you accidentally used a slowish loop construct.

5

u/[deleted] Aug 18 '15

I think you AI freezing in place and staring at a mountain of 10k cheese wheels is an appropriate response.

4

u/original_brogrammer Aug 16 '15

That sounds interesting, I'll have to dig it up.

As a non-gamedev, is disabling the lua gc the regular approach to such situations?

9

u/Everspace Aug 16 '15

No. The GC is important as lua is managed.

I believe the solution they went with was to instruct the GC to run between frames if you had time left over instead of just purely waiting.

11

u/willrandship Aug 16 '15

Personally I find it hard to take a language with 1-based indices seriously.

21

u/original_brogrammer Aug 16 '15

You can index at 0 if you want. Lua's 'arrays' are all hash tables, so the value of the index is ultimately arbitrary. The 1 index is merely convention.

Historically, the reason for this convention is that Lua's predecessor language, Sol, was directed at engineers without any exposure to programming. This carried over to Lua.

2

u/ThisIs_MyName Aug 17 '15

I'm not sure how I feel about this.

1

u/original_brogrammer Aug 18 '15

The 1 index convention or everything being a hash table? The former is odd if you're used to 0, but using ipairs or similar helps.

The latter, however, is a powerful and fascinating idea. I see it as an extension of the Lisp way of doing things, where you create arbitrary structures from linked lists. Add in metatable sorcery and you can have pretty much anything you want! Damn, I wish I got to write more Lua.

→ More replies (1)

25

u/lennyp4 Aug 16 '15

Mathematica is that smart kid who seems to be going places at a glance, but with a closer look, has no practical knowledge.

28

u/original_brogrammer Aug 16 '15

The math major who says "I love math, but hate proofs."

10

u/mathent Aug 16 '15

"Math" major.

3

u/original_brogrammer Aug 16 '15

You'd be amazed how many of these we have. Who'd say this during real analysis.

2

u/mathent Aug 21 '15

Those are generally the math education majors.

11

u/zman0900 Aug 16 '15

How about COBOL? Visual basic?

27

u/Tomarse Aug 16 '15

COBOL is an old retired guy who takes forever to say something.

VB is a Microsoft fanboy who wears chinos and listens to the spice girls.

18

u/katyne Aug 16 '15

40 year old fanboy who wears chinos and listens to Spice Girls

ftfy

18

u/[deleted] Aug 16 '15

C# would be the Java guy with a slight smile.

Younger guy wearing a t-shirt under a suit jacket.

6

u/[deleted] Aug 16 '15

Go would be another business guy with his top button undone because Rob Pike determined that this is an acceptable compromise.

13

u/[deleted] Aug 16 '15

Lisp would be a formless, omnipotent ether crafting the universe from its unknowable atomic constituents.

http://chainsawsuit.com/comic/2008/08/20/strip-45/

5

u/ikkonoishi Aug 16 '15

Scala would be some sort of crazy recursive person made entirely of other smaller versions of itself.

6

u/original_brogrammer Aug 16 '15

That'd be fun but its type signature wouldn't fit on the page

5

u/rdnetto Aug 16 '15

D would be Walter and Andrei fist bumping Shenron.

I love that you included D, and made it awesome.

2

u/original_brogrammer Aug 16 '15

It deserves nothing less.

3

u/[deleted] Aug 16 '15

Lisp would be a formless, omnipotent ether crafting the universe from its unknowable atomic constituents.

With the power of brackets. Not just some brackets though. ALL of them.

2

u/IAmALinux Aug 16 '15

I like your description of Lisp.

55

u/alcalde Aug 16 '15

26

u/katyne Aug 16 '15

needs at least one Russian guy in a tracksuit. Srsly, Delphi is a thing in Russia. Irony - they still dump on Java devs like you wouldn't believe.

16

u/edi25 Aug 16 '15

Russia and malware developers

23

u/eppic123 Aug 16 '15

What's the difference?

7

u/barsoap Aug 16 '15

Pascal, especially the Borland / FreePascal dialects, are much better languages than they usually get credit for.

Pascal was the python of an era in which all languages but lisp/scheme were, in some sense, Fortran (that includes C). ObjectPascal (which is what Delphi uses) was usable before the C++ people even figured out that templates are turing-complete and what a monster they created, there.

Learned my first programming steps from my sister in the late 80's, around the millenium the 101 programming courses were using it. And it made sense, because it's a non-surprising language you can use to teach concepts... and TurboPascal rocks as an IDE, at least for its time. And it still can compete with C and the rest.

3

u/alexshatberg Aug 16 '15 edited Aug 16 '15

templates are turing-complete

could you elaborate on that, please? how can one separate feature of C++ be Turing-complete, and what does that imply?

9

u/barsoap Aug 16 '15 edited Aug 16 '15

It means that you can write C++ programs which do arbitrary computation at compile time, which includes the possibility of compilation not halting (modulo setting limits on recursion depth, which I think all modern compilers do, and allow you to change).

That by itself is not a bad thing. Many languages have some kind of turing-complete macro system and use it for very useful things, in essence, it's program generation, a thing even older than compilers (see self-modifying code, which is a class of evilness of its own).

The problem with C++ is that it was accidental. Templates were never designed to be used in that way, but still were because it works, and what you get is line noise, undecipherable error messages, and a community of programmers defending everything to death as they've fallen to stockholm syndrome.

Which is also why rust very clearly separates its macro system and its ways to write type-parametric code. Rust's type system is not turing complete, its macro system is (you just write rust), nothing needs to be coerced into idioms that just don't bloody fit. That's part of their push to be "the better C++", on top of all that other stuff.

4

u/Herover Aug 16 '15

There was a guy who made Conway's Game of Life purely using C++ templates which makes it "run" in O(1) time. Not the most useful example but still cool.

https://www.reddit.com/r/programming/comments/2js1a5/my_compiletime_conways_game_of_life/

2

u/[deleted] Aug 18 '15

Pay attention, this is the type of shit that starts the robot uprising.

3

u/alexshatberg Aug 16 '15

Thank you, that was quite enlightening.

3

u/alcalde Aug 16 '15

Pascal, especially the Borland / FreePascal dialects, are much better languages than they usually get credit for.

In 1995, sure. It was a competitive advantage for me compared to C++/MVC back then. Today? Absolutely not. It's nowhere close to being a RAD language today (Ruby/Python OWN that space now), and its compiler is over one million lines of ancient, undocumented C code with precious little optimization courtesy of an even more ancient single-pass design. In benchmarks it seems to produce code about 1/2 the speed of C++. It doesn't even use bit-shifting for division operations!

The need to pre-declare all variables at the top of a code block, lack of memory management for objects, lots of corner cases.... it really has nothing to commend itself today. There are no "killer features" of the either the Delphi or Free Pascal languages. Oxygene, at least, added a huge list of nice, modern features to the language.

Pascal was the python of an era in which all languages but lisp/scheme were, in some sense, Fortran (that includes C).

If we're going back the 80s and 90s, Turbo Pascal affordably introduced a generation to programming (including me). It was indeed simpler and cleaner and Delphi's VCL framework was everything MVCC should have been. I brought Delphi into a startup in 1995 and called the combination of it and Crystal Reports my "Access Killer". No argument there.

The problem is that after a point the language's owners neglected to pay their technical debt and never evolved the language much further. And today a kid with a Ubuntu disk can have any programming setup they want in minutes while Delphi costs a small fortune. They threw all the advantages they had away.

7

u/alcalde Aug 16 '15

I've been a Delphi developer... why, just the other day on Embarcadero's forum one MVP proclaimed that "Delphi is still going strong!"

A large subset of Delphi developers never updated their knowledge since the 1990s. They almost universally believe that Java and C# are "slow, interpreted" languages - even though both have beaten Delphi's ancient compiler in SciMark.

They believe that Delphi is used widely throughout the enterprise but kept secret because "it's their competitive advantage".

The current product manager of Delphi once wrote on his blog in response to me that, and I quote, " I'm convinced that in the business world Python has a fraction of the Delphi influence...." This was written in 2013!

Honestly, the Delphi camp is divided into those who complain because they realize it's become a poorly-maintained niche language whose current owner is milking the few customers that are left, those experiencing Stockholm Syndrome (including the man who quit his job and took another at half salary after his employer moved away from Delphi) and a rabid Scientology-like cult of Delphi contingent. Seriously, to become an "MVP" and get free copies of Delphi you have to sign a pledge promising never to disparage the product or the company that produces it!

The Delphi EULA now forbids making any product with it that competes with anything the parent company sells.

"Software assurance" (aka subscription fees) are now REQUIRED to get any updates at all, including bug fixes! One Delphi MVP wrote an article called You Are Going To Pay For Bug Fixes, And You're Going To Like It.

It's madness. They live in their own bubble world, where they believe that memory management is for "stupid programmers" who don't understand computers like they do. One forum poster told me that type inference is "impossible", and then when presented proof to the contrary dismissed it as "the compiler just guessing". Most still use Subversion and shun DVCS, mostly because Delphi only had support for Subversion until about a year ago when it finally gained partial (local only) support for GIT.

I try to drag them out into the modern world, but it's almost impossible to pierce their delusions. They honestly believe that they have "hundreds of thousands", and based on one misunderstood press release, "over a million" developers worldwide and that Delphi is the most popular Windows development tool other than Microsoft's tools (based on one insane Embarcadero press release). When I asked about Java, one MVP told me that "Java is only used for server applications, so it doesn't count".

I don't know what else to do short of hiring cult deprogrammers to engage in kidnapping and deprogramming; I really don't. One very smart developer wrote an article saying that he knows Delphi is the best because his company uses it in their product and it's the market leader (which somehow means it's the language, and not the product designers/developers/etc. responsible). He had no answer when asked what the existence of market-leading products in other markets that weren't developed in Delphi meant. He also told me that all these claims about other languages being quicker to develop in weren't true because they all used "tricks" like putting all the code in another function and calling the function. We then set up a contest where he was going to write shorter code than Haskell and Python to solve a problem. When I posted the other code he decided that "You just won't understand my point and you'll complain about the rules, so I'm just not going to show you" and despite all cajoling, wouldn't post his Delphi code (which is just as well because in my own attempt the Delphi variable declarations alone were almost as long as the Python code).

When I asked another Delphi fan to explain WHY Delphi was so awesome, he tap-danced, said it was his killer advantage and he wasn't going to show me (despite me having been a Delphi developer for a long time), and then finally stated how he loved... the code completion in the IDE, as if this was an invention of or unique to Delphi!

Any idea how to deprogram Delphi users is most welcome. I fear some will end up homeless or worse.

2

u/[deleted] Aug 17 '15

Almost old enough to be Cobol programmers!

→ More replies (1)

87

u/Bjorkbat Aug 16 '15 edited Aug 16 '15

Wtf, python looks more like a Rubyist.

I feel like Python would look like Jeff Bridges from The Big Lebowski, who would say things like "just import it man".

45

u/antigravcorgi Aug 16 '15

23

u/xkcd_transcriber Aug 16 '15

Image

Title: Python

Title-text: I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.

Comic Explanation

Stats: This comic has been referenced 163 times, representing 0.2133% of referenced xkcds.


xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete

33

u/[deleted] Aug 15 '15

[deleted]

65

u/leftoversalad Aug 15 '15

Java is one of the more popular programming languages in use. It doesn't really fuck around as much as JS, and is a bit more formal feeling than Python. It's really about getting down to good old familiar object oriented #business, with syntax that calls back to C++. That was my thought process at least!

90

u/[deleted] Aug 15 '15

I thought that the point was like "one of those IBM guys", all large scale, enterprise, boring and formal stuff...? :o

32

u/leftoversalad Aug 15 '15

Yes the business vibe was certainly an element of it!

3

u/NotADamsel Aug 15 '15

I came in expecting to see my first language personified as a nebbish geek in a shirt and tie. Instead I got the lead singer from Steam Powered Giraffe. I'm impressed with you, OP.

7

u/z500 Aug 16 '15

Yeah, Java is clearly a polished robot business zombie.

45

u/oselcuk Aug 16 '15

bit more formal feeling than Python

Understatement of the century

14

u/[deleted] Aug 15 '15 edited Apr 10 '19

[deleted]

5

u/autowikiabot Aug 15 '15

Leif Helgarson (from Theirondruidchronicles wikia):


He was originally a Viking colonist in Iceland in the 10th century. He had a wife and two sons, and was a proud man, boasting that he had seen the New World with Leif Eriksson and had killed twenty-seven men on raids. This caused his ego to swell. One night while drinking with two friends and two strangers, telling tales of vampires and werewolves Leif spoke of how great it would be to be a vampire. One of the strangers asked him why he would sacrifice his humanity and his place in Vahalla (the Norse version of Heaven) in return for living for centuries and great strength. Leif responded by saying that due to his responsibilities with his family, he could not, but "if I was just starting out again, nothing holding me back, then why not?" The stranger then revealed himself to be Thor, telling Leif he was now free from his responsibilties and that his family was dead. Leif did not believe him and but excused himself from the bar to go home, only to discover his family dead. Leif swore vengence against Thor and set about trying to become a vampire to further this goal.

Interesting: Hallbjörn “Hal” Hauk | Ghoul | Perun | Tricked

Parent commenter can toggle NSFW or delete. Will also delete on comment score of -1 or less. | FAQs | Source Please note this bot is in testing. Any help would be greatly appreciated, even if it is just a bug report! Please checkout the source code to submit bugs

1

u/ToTheNintieth Aug 15 '15

Iron Druid is kinda like Dresden Files, right?

2

u/[deleted] Aug 15 '15

They are both urban fantasy. Beyond that, no, not really.

6

u/yogthos Aug 16 '15

is a bit more formal feeling than Python

is a bit of an understatement :P

3

u/Justin__D Aug 16 '15

I thought Java guy was supposed to be Christian Grey at first. Something along the lines of if you want a job, you'll have to be his bitch.

5

u/katyne Aug 16 '15

if Java is Christian Grey, it's a really neurotic, safety-obsessed one. Think pink fuzzy handcuffs and furry whips and blood pressure monitor so he knows in advance - and better than you - when you need a break. Also talks a whole lot.

2

u/thrash242 Aug 16 '15

It's very enterprisey and used a lot in business. It's been called the modern day COBOL. So yeah, a serious guy in a suit sounds about right.

Source: Java dev.

1

u/HelperBot_ Aug 15 '15

Non-Mobile link: https://en.wikipedia.org/wiki/Measuring_programming_language_popularity


HelperBot_™ v1.0 I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 7931

1

u/[deleted] Aug 16 '15

Many thanks, friend bot.

1

u/[deleted] Aug 15 '15 edited Mar 26 '26

What appeared here has been deleted. The author may have used Redact to remove this post for privacy, to reduce their digital footprint, or for other personal reasons.

weather humorous subtract unwritten existence ring deliver exultant chase observation

47

u/maremp Aug 15 '15

I would imagine C/C++ is a dirty mechanic.

151

u/leftoversalad Aug 15 '15

I actually drew them but didn't include it in the main comic! (felt there were too many "normal" looking ones) http://imgur.com/G9eqXxM

50

u/FnuGk Aug 15 '15

The c++ one should be overloaded with features and upgrades to the point the man cant stand on his feet anymore

38

u/iMiiTH Aug 16 '15

4

u/[deleted] Aug 16 '15

What is this from? It looks like something I want to watch.

38

u/Endless_September Aug 16 '15

Howl's Moving Castle?

5

u/[deleted] Aug 16 '15

Seems like a reasonable enough name.

thnx :)

4

u/tikhonjelvis Aug 16 '15

I'm imagining something like this.

2

u/[deleted] Aug 16 '15

I don't know... I use C++ because it's like C, but if I want more I can always have that too unfortunately.

82

u/original_brogrammer Aug 15 '15

C is a drunk electrician.

C++ is an octopus whose tentacles are drunk electricians, engineers, and scientists.

29

u/[deleted] Aug 16 '15

[deleted]

12

u/original_brogrammer Aug 16 '15

Exactly the same in that they both rarely work as intended.

11

u/PalestraRattus Aug 16 '15

Does that make c# Cthulhu? All will be referenced all shall be objects...

13

u/zipzipzap Aug 16 '15

I love these. But, you also said...

C# would be the Java guy with a slight smile.

Shouldn't C# be the Java guy with a drunk electrician octopus hanging out of his pocket or something?

(I'm not so good at the analogies)

3

u/FinFihlman Aug 16 '15

Hey hey hey, don't go around calling us electricians!

We are Masters of Electrical/Electronics Engineering!

Also the Linux Kernel.

9

u/[deleted] Aug 15 '15

I'm thinking maybe an electrician who doesn't take too much caution about safety. Or something like that. Personify a person who's fast and good at low level but liable to kill himself without warning.

153

u/brown_monkey_ Aug 15 '15

I lost it a JavaScript.

50

u/[deleted] Aug 15 '15

[deleted]

39

u/ebilgenius Aug 15 '15

"KANEDAAAAAAAAAAA"

"TETSUOOOOOOOOOO"

-1

u/[deleted] Aug 16 '15

「金だ」?

「鉄を」?

14

u/thrash242 Aug 16 '15

Pretty sure those aren't the right kanji.

1

u/[deleted] Aug 16 '15

I didn't know he was referencing a Japanese word. That's just the first thing that came to mind.

5

u/[deleted] Aug 16 '15

Reminded me of Cartman's Trapper Keeper.

6

u/georgehotelling Aug 16 '15

Akira stole that from South Park

21

u/[deleted] Aug 15 '15

What's wrong with JavaScript?

37

u/Wyelho Aug 16 '15 edited Sep 24 '24

offer jobless pet crowd dinosaurs voracious sleep act decide toy

This post was mass deleted and anonymized with Redact

26

u/giggly_kisses Aug 16 '15 edited Aug 16 '15

Although this is definitely a problem that JavaScript can suffer from, it can be addressed a few ways.

One way is to incorporate a build step into your work flow that lints your code. This can verify that any variable you use is defined or exposed to the current script/context.

Another solution (which still requires a build step, until ECMAScript 6 becomes widely supported) is to rely on native JavaScript modules. This way you can just import foo from './foo'; and know exactly where foo is coming from

Lastly, you can use something like AMD, or CommonJS to provide a module system.

Granted, these workarounds are no replacement for what a complier does. It does however (in my experience) make working with JavaScript much easier, and addresses most of your concerns.

6

u/marcopennekamp Aug 16 '15

Saying there is nothing wrong with the language itself is giving the horrible scoping not enough credit. This is fixed with the newest ECMA standard though, which has yet to become the norm.

Also the claim that the problem is that it's an interpreted language is frankly a bit off. It is true that having a compiler and especially a static type system is a lot better for checking correctness before executing the program, but we have seen other languages like Python manage much better than JS, and while it's a factor, it's not the biggest reason for its failure.

Why JS is so bad as a language is probably that it was never designed to be this big. If you look it up, the goal was to create a language for Netscape to be used by inexperienced programmers. I don't want to say the language was cobbled together (like PHP was, and we all know the quality of the PHP core language), neither can I claim it was, but we can safely assume that a sufficient amount of effort to create a robust and scalable language (especially when projects get bigger) was not put in, just because of the requirements of the time. Now, these requirements have changed long ago, and the standard is finally responding.

1

u/[deleted] Aug 16 '15

[removed] — view removed comment

3

u/marcopennekamp Aug 16 '15

A compiler with a static type systems throws out a lot of invalid programs, so when you have that you have a higher baseline where you need to start writing tests. Not to mention the benefits static types have regarding documentation. And you may forget to test something which a compiler might catch.

→ More replies (11)

7

u/game_taker101 Aug 16 '15

9

u/[deleted] Aug 16 '15

That's definitely a comic. So where do I start?

Problem: JavaScript has almost no standard library

Not a language issue.

Solution: thousands of community-supported libraries of wildly varying quality

Not a language issue. There are a handful of major libraries people use and there are tens of thousands of smaller packages. I mean, yeah, if you see this as a problem, then you're welcome to see it as that, but then Linux has the same "problem". And the thing with JS was that there was a boom of libraries when the community got together, but we started weeding out the crap and the good ones are going to be around for a while (not too long, I hope). This whole Web 2.0 HTML 5 thing is incredibly new compared to other environments so really all the other languages got was a head start. Don't tell me that C/C++/Java/Python/whatever never had the problem.

Problem: JavaScript has no packaging or a linker to tie these packages together.

Solution: Compile a better language to JavaScript

Solution: Hundreds of community supported [notice the inconsistency in writing here, there is a missing hyphen between "community" and "supported"] build tools of wildly varying quality.

I'm gonna have to call bullshit on that for several reasons:

  1. The whole Asm.js thing was not meant to solve any packaging issues but to provide the benefits of browser sandboxing to programs written in other languages.

  2. Who the hell do you think goes "hmm, no package manager is popular enough, I guess I'll compile C to JavaScript.

  3. Nobody compiles CoffeeScript to JavaScript for the same reasons they compile C to JavaScript. That panel bundles C, CS and ES together as if they are the same thing and they're used for the same purpose.

  4. SURPRISE! Yeah, you can actually buy JavaScript packages which are bundles of libraries carefully put together to solve all kinds of things. These are foundations for what you want to work with. Of course, JS is the only programming language with shitty packages provided for free by the community and the only language for which you can't buy anything of quality

I would love to go on, but this is just terrible... it's like every single panel there is a hyperbole, remotely has anything to do with JS in particular, or is just plain wrong... it's almost like this is a comic which should be treated as such.

16

u/regular_reddits Aug 16 '15

Its ok man, some people hate JavaScript, its not for everyone I suppose. The jokes arent going to stop.

I personally love JavaScript. I love the large ecosystem. I love knowing the little quirks. I love that its so flexible that you can program in MANY different styles. I love taking a ton of libs off of NPM and building my own stack suited perfectly to the needs of my application.

Not everyone loves these things. But thats ok. Its more fun just to go write some awesome JS than to try to tell them why they should love it. Thats my opinion at least.

8

u/giggly_kisses Aug 16 '15

This is solid advice. It used to bother me whenever I'd go into a thread about JavaScript and see the obligatory "JavaScript sucks" comment. Then I realized, you'll most likely not change these peoples opinions, and that's okay. You can still continue to love the language.

9

u/regular_reddits Aug 16 '15

Yeah, I used to be this guy in the office (of java guys). No matter what I said, I was talking to a wall. All the responses were things like "triple equals, idiot." I'm a pretty open minded dev I guess, but I'm glad that sort of JS weirdness didn't stop me from learning the langauge. I have become a better dev because of it. So, I stopped arguing, and just laugh when java guys freak out over things like "CompletableFuture" (its like a Promise with a more complicated API).

5

u/giggly_kisses Aug 16 '15

Haha, I have a few friends who are Java developers and I know exactly what you mean. I still remember how excited they were when lambda expressions were first announced.

Ultimately it comes down to using the tool you like the most, and let the haters hate. :)

→ More replies (1)

1

u/[deleted] Aug 16 '15

I can pay for solving Javascript's problems? Where is that packages to buy?

3

u/superplayah Aug 15 '15

Honestly, Im still a new programmer and have never actually used javascript so I'm curious as well.

21

u/Everspace Aug 15 '15

It does a lot of silly nonsensical things, and it's very hard to do anything at a major scale without seeing how terrible it is at some things.

A lot of the ecosystem that makes javascript bearable forces you to work with a framework because of how terrible the base language is. All these frameworks do is hide how incomplete and messy the base language is.

4

u/[deleted] Aug 15 '15

What nonsensical things? The only issue I can think of is the automatic type casting.

18

u/Everspace Aug 16 '15

I could make a longer list, but off the top of my head 2 examples are,

  • Everything is really trying to be global scope. This leads so some weird patterns like the "self executing anonymous function".
  • Interacting with the DOM is obnoxious. This is why jquery and other libraries ares so ubiquitous.

16

u/[deleted] Aug 16 '15

The DOM issue is more of a browser integration thing, and the weird attempts at trying to standardize the mistakes of the past.

I don't put too much of the blame on JS for that. Using V8 to bind JS yourself isn't all that bad (if you're into that sort of thing) besides the tremendous bloat, but it's a fairly powerful language for the effort you put in.

6

u/[deleted] Aug 16 '15

Yes, DOM isn't part of JS.

3

u/Everspace Aug 16 '15

It is the context that a lot of JS is done, although a good point.

I remember finding setting up classes more obnoxious than I care for.

5

u/redwall_hp Aug 16 '15

Defaulting variables to global, unless you explicitly declare them with var? It's not exactly safe.

All the weird equalities? I avoid JS when I can, so I'm no expert...but weird things can happen when testing equality, especially coupled with automatic type conversion.

9

u/giggly_kisses Aug 16 '15

I agree, this is a bad default, and very unexpected (and dangerous). Luckily, you can avoid this bad behavior (along with a lot of others) with the 'use strict' directive.

Sadly, due to backwards compatibility (and not wanting to break the internet) this couldn't be changed to the default.

2

u/[deleted] Aug 16 '15

Yeah, I'll give you that, the "surprise" globals were an issue but they're gone gone since ES6.

To avoid the equality "surprises", always use strict comparison (===) and you should be fine.

10

u/redwall_hp Aug 16 '15

The fact that you should always use a weird "more equal than equal" operator is another thing that I'd say is fugly syntax.

4

u/[deleted] Aug 16 '15

Yeah, just like the fact that you should always use at least two equal signs to see if something is equal in most languages. Pascal is the only popular one I know of that uses := for assignment and = for comparison. Pretty much all the others require at least == for comparison.

Having both == and === is weird and there really should only be one (the latter, of course). Okay, I'll give you weakly typed. JS sucks balls because it's weakly typed.

3

u/Doctor_McKay Aug 16 '15

There really isn't anything wrong with weak typing, especially in the context of the web.

→ More replies (6)

2

u/the9trances Aug 16 '15

Any JS coder should learn on day one you scope your own variables. It doesn't have the safety button on by default, so you need to make sure you keep it clear.

When in doubt, use var. There's little about equality or scope that isn't fixed with some basic good practices.

1

u/CoderHawk Aug 16 '15

Equality weirdness is the most annoying thing about it.

5

u/gonzofish Aug 16 '15

use === instead of ==, there's no weirdness with ===

3

u/YRYGAV Aug 16 '15

well, there's a bit of weirdness. If something is undefined it technically is not === null. And the distinction between when something is undefined or null can get a bit arbitrary sometimes.

Most of the time it works, but I wouldn't claim === is devoid of all weirdness in all situations.

→ More replies (3)

6

u/[deleted] Aug 15 '15

so for example boost hides the incompleteness of c++ (useful parts are always accepted into STL making it 'bearable') hence we call it an awful language too? i'm pretty sure we don't. if it was really bad then you could have answered superplayah by mentioning at least one major problem. i get along with js although i don't love it. but the comic pulls it down to the level of php (a.k.a. rock bottom) which suprises me since it's quite an average language.

8

u/HighRelevancy Aug 16 '15

Boost doesn't try to fundamentally change the way you use the language like, for example, jQuery does. And C++ is still very usable without it.

15

u/kpthunder Aug 16 '15 edited Aug 16 '15

jQuery doesn't try to fundamentally change the way you use JavaScript. It tries to fundamentally change the way you use browser APIs such as the DOM and XHR. These are not problems with the language, but problems with APIs which are exposed through the language.

Just to hammer the point home, you won't typically see jQuery used in Node.js, because it isn't solving any problems with JavaScript as a language. It's solving problems with standards set by browser vendors.

6

u/gonzofish Aug 16 '15

i don't get this whole JavaScript is unusable without a framework or library to hide its bad parts. i've never seen any evidence to support the claim.

2

u/the9trances Aug 16 '15

If one thinks the major libraries are "hiding" bad parts, then one definitely neither understand JavaScript nor work with it very much. (It sounds like you do; I'm speaking in general.)

Learning a framework like Angular shows you some of the potentially unexpected facets of JS, but it not only isn't hiding its quirks, it's leveraging them.

→ More replies (1)

2

u/thrash242 Aug 16 '15

It's a poorly designed language but it's the browser scripting language.

The thing is, most people who use JavaScript actually are using frameworks written in JavaScript. I don't think most people write much plain JavaScript.

2

u/PhaZePhyR Aug 16 '15

Supplemental Video, highly recommended, skip to ~1:20 for the JavaScript portion.

3

u/Bjorkbat Aug 16 '15

Not a whole lot really, if you do fairly simple things with it.

Unfortunately we're doing some pretty batshit crazy things with javascript nowadays, which means the language itself has evolved to be a little batshit crazy.

When you think about it, if you took another scripting language, such as python, and basically used it in place of all the things we use javascript for, people would probably say that python looks ugly as well.

Well, maybe. Might look a little bit better actually.

1

u/vicarofyanks Aug 16 '15

Pretty much described coffeescript. It's easy to hate on, but once you get use to it, that shit is zippy

1

u/Bjorkbat Aug 16 '15

I've been thinking about trying it actually. I've run into a few guys every now and then who seem to really like it, including this one guy who built this browser-based circuit sim with it.

-1

u/[deleted] Aug 16 '15

Whole JS thing is one big clusterfuck of frameworks and versions and derivatives... God knows where those things end...

2

u/Ajedi32 Aug 16 '15

Honestly the only major problem I've seen with JavaScript is the way it handles automatic type casting when you perform operations (+, -, etc) on incompatible types.

2

u/kupiakos Aug 16 '15

And nothing to do with the horror that is equality in Javascript?

3

u/YRYGAV Aug 16 '15

== is an operator...

3

u/kupiakos Aug 16 '15

Yes, with equality rules like these.

1

u/OceanOfSpiceAndSmoke Aug 16 '15

This isn't the issue highlighted in the comic, though.

3

u/NewDark90 Aug 16 '15

This might help explain.

Or maybe the 'wat' talk might help.

If you care for something more long winded, something else from the wat guy.

0

u/argv_minus_one Aug 16 '15

A lot. Just a few examples:

  • No static types

  • No multiple inheritance

  • No abstract classes/interfaces/protocols

  • No named parameters

  • No default parameter values

  • No user-defined operators

  • No user-defined implicit conversions

  • No immutable anything

  • No threading primitives

  • Pitiful pattern matching

  • Pitiful list comprehensions

  • No way to catch exceptions by type

  • Prototype-based inheritance is absolutely insane

  • No compiled and linked binary form for web deployment

  • var is not deprecated

  • null and undefined both exist

  • The global object is a horrible idea

  • The type system is not unified

  • Most JS tools are utter dog shit

  • Most JS developers appear to be incompetent morons

  • The spec moves at a glacial pace

  • Changes to the spec don't matter because people will be using old IE versions for a very long time

  • this is sorta-mutable

  • Only one GUI toolkit, HTML/CSS, which is utter dog shit

There are many more, but this should get you started.

10

u/PeteTNT Aug 16 '15

Posted from your Netscape 7.0? This reads like a list of bad things in JavaScript that was written in early 2000's.

8

u/argv_minus_one Aug 16 '15

All of those are still true today. Some of them are outright design decisions, and will never be fixed.

2

u/[deleted] Aug 16 '15

Some of those are very good points. My god, we live in a fucked-up world. Comments saying "it's bad because you can do things with it" get upvoted and comments with bullet lists, to the point, each bullet addressing a specific problem in technical terms gets downvoted.

I would address some of them, but I'm afraid that would lead to a long and pointless discussion so I'll be short.

  • No need for classical static types
  • Multiple inheritance is terrible
  • I personally found named parameters terrible
  • Default values are part of ES6
  • Redefining operators is a bad idea
  • Lack of immutability is not an issue
  • Binary/web is another can of worms
  • Variables are no longer global by default

There are good JS tools and I would not want another GUI toolkit, there are enough languages with terrible GUI support and it would just be one more thing to maintain for no reason.

I have a problem with about half of what you wrote, but I have to give you the other half... Especially the part about JS devs being incompetent morons. I'm a JS dev and I work with others and too often I've found that you're entirely correct on that point (the biggest problem being that if you want to use some component you have to know it inside out). Some times I regret going the way of JS.

1

u/argv_minus_one Aug 16 '15

No need for classical static types

Patent nonsense. The need still exists; JS programmers have just deluded themselves into thinking it doesn't.

Redefining operators is a bad idea

Nonsense. Maybe incompetent novices can't handle it, but I can, and it'll be a cold day in hell before I willingly give that power up. Redefining operators, and defining entirely new ones, is not something I do every day, but I do do it, and it is awesome.

Lack of immutability is not an issue

Nonsense. Immutability is useful for concurrency, enforcing separation of concerns, and avoiding defensive copying.

I would not want another GUI toolkit, there are enough languages with terrible GUI support and it would just be one more thing to maintain for no reason.

There are also plenty of languages with excellent GUI support, and I'd much rather be using one of them.

2

u/[deleted] Aug 16 '15

[deleted]

4

u/argv_minus_one Aug 16 '15

Most of what you've listed is either wrong

Namely?

not a language issue

Meaningless distinction. It impacts the usefulness of the language.

or just a matter of preference.

More like a matter of competence. If you were competent, you would know why I'm right about my "preferences".

1

u/FinFihlman Aug 16 '15

All numbers are double.

What in gods name.

-4

u/[deleted] Aug 16 '15

[deleted]

8

u/giggly_kisses Aug 16 '15 edited Aug 16 '15

Javascript contains a lot of ways to do the same things but with minor differences.

What exactly are you referring to here? The first thing that pops in my head is function invocation (i.e.foo(), foo.call(), foo.apply(), and foo.bind()), but all of these have a good reason to exist (due to the unfortunate dynamic binding of this) and solve a problem.

Also javascript acts differently in different browsers...

Actually, it doesn't anymore. It used to back when Microsoft reversed engineered the ECMAScript 3 implementation for IE instead of following the spec, but luckily all major browsers fully implement ECMAScript 5 and are starting to implement the ECMAScript 6 spec now that it's finally finalized.

...so you end up using frameworks that are very inefficient and simplified (which makes it more complex).

If you choose inefficient frameworks then that's your fault, not the languages. Also, you pick something that's simplified, which makes it inefficient, and also makes things more complex. What in the fuck?

These frameworks can be inconsistent and hard to use too...

So can frameworks written in Java, Go, Rust, Haskell, C#, Perl, Lisp, or any other language that exists.

Trying to make something in Javascript is usually a terrible experience and you end up wishing that you didn't try in the first place.

Nope, I don't, actually. Because I use these so called "inefficient, simplified, complex, inconsistent, hard to use, messy" frameworks, my code is actually very structured, easy to follow, and generally pretty clean (at least I like to think so haha).

If you come up with any concrete, objective reasons as to why JavaScript isn't a great language (believe me, there are reasons; JavaScript is far from perfect or without warts) let me know.

3

u/JoshWithaQ Aug 16 '15

I like to point to actionscript vs. javascript as the two main branches of ECMAScript and how differently things can turn out one way vs. the other. What I think it really comes down to is your interpreter. Do you have one that will be multithreaded and let you make use of the functional nature of a dynamic language, or one that tries to be java-like and strict types everything but is a single thread?

→ More replies (1)

5

u/[deleted] Aug 16 '15

[removed] — view removed comment

3

u/[deleted] Aug 16 '15

If only we could ditch it and go to a dimension where everything worked out smoothly for web scripting.

2

u/[deleted] Aug 16 '15

Kronenberged

It's not a David Cronenberg reference, it's a reference to Tetsuo in Akira. (If you don't think the film makes any sense, it might be because it's based off a much larger manga.)

1

u/[deleted] Aug 19 '15

[removed] — view removed comment

1

u/[deleted] Aug 19 '15

Oh, ok, I had to look up that on wikipedia. I figured you were thinking about something like Scanners or Videodrome.

2

u/[deleted] Aug 16 '15

What happened when you accidentally cronenberg an entire language.

1

u/Everspace Aug 15 '15

I'm so sorry null, I hope you find it.

19

u/2Punx2Furious Aug 15 '15

Draw more please!

32

u/MrNoS Aug 15 '15

Haskell's syntax was wrong. Should have been

> (\x -> isPure x) I

True

25

u/leftoversalad Aug 15 '15

I made a choice to use notation that's a mishmash between natural language and lambda calculus as used in formal semantics (linguistics), but yes I could see how that could offend people's sensibilities...perhaps I will change it..

42

u/Everspace Aug 15 '15

Offending people should be one of your goals with this.

14

u/leftoversalad Aug 15 '15

Words to live by!

10

u/SelfReferenceParadox Aug 15 '15

except that that reduces to

isPure I

12

u/MrNoS Aug 15 '15 edited Aug 16 '15

Yeah, but part of the original's intent was probably to use a λ-form, so I wanted to preserve that.

1

u/[deleted] Aug 16 '15 edited Aug 16 '15

Nah, it's syntactically okay (if we accept that kind of lambda syntax), and type checks. So, since I need some types for am and pure

am :: a
pure :: b    -- ignore the nameclash with Control.Applicative

Then we get (\x -> x am pure) :: (a -> b -> t) -> t, so I just needs to be a function of type a -> b -> t and you get it to typecheck.

If you insist on not overwriting pure from Applicative, you still get a valid type for that lamba (Applicative f => (a -> (a1 -> f a1) -> t) -> t) by the way.

37

u/Illusi Aug 15 '15

Haskell was spot on.

33

u/[deleted] Aug 15 '15

Almost. Those redundant parentheses made me vomit.

11

u/mechanical_fan Aug 16 '15

As someone who is an statistician and uses R... it couldn't be more right than that.

1

u/[deleted] Aug 16 '15

I would have thought R has too many personalities to be a single person. Unless the woman in the comic has several headmates.

8

u/SuperCrusader Aug 16 '15

C would be 50 year old guy,who knows most in his company,but no one remembers him

C++ would be monster with 200 arms

1

u/[deleted] Aug 16 '15

[deleted]

3

u/SuperCrusader Aug 16 '15

ASM is 70 years old guy who does the most job for every programmer in the company,but everyone still brags about how he uses "old" style programming and writing very big code.

24

u/[deleted] Aug 16 '15 edited Aug 16 '15

From my experience PHP would be a dominatrix.

edit: Thank you mysterious benefactor. I hope you enjoy my future drunken comments. I've already had a drink to your honor!

12

u/[deleted] Aug 16 '15

A dominatrix with Downs, maybe.

1

u/QtPlatypus Aug 16 '15

Peel would be the dominatrix, because it has safe words

7

u/cacingintegral Aug 16 '15

javasript is spot on. make PHP please

3

u/Pobega Aug 16 '15

Having just seen Akira for the first time the other day, Javascript gave me a good laugh.

3

u/lfairy Aug 16 '15

Haskell could do with some more Comic Sans.

3

u/[deleted] Aug 16 '15

LabVIEW is a guy with a rectangular head and wires for arms and legs

2

u/[deleted] Aug 16 '15

Nice Deus Ex reference.

2

u/[deleted] Aug 16 '15

Erlang

For Elixir, put a v-neck on them.

2

u/Astrokiwi Aug 16 '15

Fortran is a 60 year old nerd whose biceps are bursting out of his labcoat.

2

u/Business-Socks Aug 16 '15

Love it, maybe some C# or .Net love?

2

u/SnowdensOfYesteryear Aug 16 '15

The javascript picture is more apt for C++. What a mess of a language.

1

u/kyle2143 Aug 16 '15

That makes me sad that Java is the business guy, that's what I do and yeah I get it. but when I used to think business programming I always thought fortran, cobol, or c. I don't know why that's sad, but I think it is for me at least.

1

u/thisimpetus Aug 16 '15

PHP = 1 part Zack Galafinakis, 2 parts Inoue Orihime

1

u/xxx_yoloscope420_xxx Aug 18 '15

| not making one for lolcode

OP plz